<filename>acmicpc/5565/5565.py
total = int(input())

for i in range(9):
    total -= int(input())
print(total)

<filename>acmicpc/5565/5565.py
total = int(input())

for i in range(9):
    total -= int(input())
print(total)
