import sys readline=sys.stdin.readline X,Y=map(int,readline().split()) X*=2 Y*=2 ans=1 while ans**2<=X**2+Y**2: ans+=1 print(ans)