import math X,Y=map(int,input().split()) a=math.sqrt(X*X+Y*Y) print(int(a*2+1))