xp,yp = map(int, input().split()) f = int(2 * (xp ** 2 + yp ** 2) ** 0.5) + 1 print(f)