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