数组存起来,跑一遍MAX函数即可

l = [int(i) for i in input().split()]
x = int(input())
for i in l:
    print(max(0,x-i),end=' ')