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