import math x,y=map(int,input().split()) z=math.sqrt(x*x+y*y) z2=int(z*2) z3=z2+1 print(z3)