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



if a <= b and b <= a + w:

    print((0))

elif a <= b + w and b + w <= a + w:

    print((0))

elif b+w < a:

    print((a - (b+w)))

elif a+w < b:

    print((b - (a+w)))

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



print((max(0, abs(a-b)-w)))

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

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

-if a <= b and b <= a + w: -    print((0)) -elif a <= b + w and b + w <= a + w: -    print((0)) -elif b + w < a: -    print((a - (b + w))) -elif a + w < b: -    print((b - (a + w))) +print((max(0, abs(a - b) - w)))