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