W, a, b = [int(i) for i in input().split()]

if b > a + W:

    print((max(0, b - a - W)))

else:

    print((max(0, a - b - W)))
W, a, b = [int(i) for i in input().split()]

print((max(0, abs(a - b) - W)))
W, a, b = [int(i) for i in input().split()]
if b > a + W:
    print((max(0, b - a - W)))
else:
    print((max(0, a - b - W)))

W, a, b = [int(i) for i in input().split()]
print((max(0, abs(a - b) - W)))

-if b > a + W: -    print((max(0, b - a - W))) -else: -    print((max(0, a - b - W))) +print((max(0, abs(a - b) - W)))