xp,yp=STDIN.gets.split(" ") xp=xp.to_f yp=yp.to_f r=Math.hypot(xp,yp) puts (r*2+1).to_i