import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines x,y = map(int,read().split()) for R in range(10**5): if R*R > 4 * (x*x + y*y): break print(R)