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