https://www.acmicpc.net/problem/5565
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int sum=s.nextInt();
for(int i=0;i<9;i++){
int a=s.nextInt();
sum-=a;
}
System.out.print(sum);
}
}