x, y = map(int, input().split()) r2 = 2 * (x**2 + y**2) for i in range(100000): if i * i > r2: print(i) break