x,y=map(int,input().split()) for i in range(10**5): if i**2>4*(x**2+y**2): print(i) exit()