import sys input=lambda: sys.stdin.readline().rstrip() x,y=map(int,input().split()) d=x**2+y**2 print(int(d**0.5*2)+1)