X,Y=map(int,raw_input().split()) for i in range(50000): if i*i > 4*(X*X+Y*Y): print i exit()