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