x, y = map(int, input().split()) t = x**2+y**2 r = 0 while True: if r**2 > 4*t: print(r) exit() else: r += 1