XP, YP = map(int, input().split()) print(int(2 * (XP ** 2 + YP ** 2) ** 0.5) + 1)