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

ans = max(a,b)-(min(a,b)+w)



if ans > 0:

    print(ans)

else:

    print((0))

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

print((max(max(a,b)-(min(a,b)+w),0)))
w, a, b = list(map(int, input().split()))
ans = max(a, b) - (min(a, b) + w)
if ans > 0:
    print(ans)
else:
    print((0))

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

-ans = max(a, b) - (min(a, b) + w) -if ans > 0: -    print(ans) -else: -    print((0)) +print((max(max(a, b) - (min(a, b) + w), 0)))