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