import math X, Y = map(int, input().split()) Z = math.sqrt(X**2 + Y**2) * 2 f, i = math.modf(Z) if f == 0: print(int(i+1)) else: print(int(math.ceil(Z)))