x,y = map(int,input().split()) for d in range(200000): if 4*(x*x+y*y) < d*d: print(d) break