w, a, b = list(map(int, input().split()))

if b + w < a:

    res = a - (b + w)

elif a <= b + w <= a + 2 * w:

    res = 0

else:

    res = b - (a + w)



print(res)

w, a, b = list(map(int, input().split()))

res = max(0, abs(a - b) - w)

print(res)

w, a, b = list(map(int, input().split()))
if b + w < a:
    res = a - (b + w)
elif a <= b + w <= a + 2 * w:
    res = 0
else:
    res = b - (a + w)
print(res)

w, a, b = list(map(int, input().split()))
res = max(0, abs(a - b) - w)
print(res)

-if b + w < a: -    res = a - (b + w) -elif a <= b + w <= a + 2 * w: -    res = 0 -else: -    res = b - (a + w) +res = max(0, abs(a - b) - w)