https://www.acmicpc.net/problem/5565
sum=int(input()) for i in range(9): a=int(input()) sum-=a print(sum)