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