X,Y = map(int, input().split()) R = (X*X + Y*Y) ** .5 print(int(R*2+1))