import math X,Y=(float(i) for i in input().split()) X*=X Y*=Y X+=Y R=2*math.sqrt(X) R=math.floor(R) print (R+1)