main=do [x,y]<-getLine>>=return.map(read::String->Int).words print$floor(sqrt(fromIntegral(x*x+y*y))*2)+1