for(s<-readLine split' ')println(try{var i,j,k,n=s.toInt k=2 while(j/2!=0)if(j%k==0){n+=i/k j/=k}else k+=1 n-i}catch{case _=>"Wait, that's not a number..."})