a, b = list(map(int, input().split())) print(max(0, a + b - 2 * min(a, b)))