import math xp, yp = map(int,input().split()) r = math.sqrt((pow(xp, 2) + pow(yp, 2))) print(int(2 * r)+1)