x,y = map(int,input().split()) r = int((x*x +y*y)**0.5*2) + 1 print(r)