x, y = map(int, input().split()) if x == y: print(x) else: z = abs(abs(x) - abs(y)) print(z+1)