import java.util.*; import java.lang.*; import java.io.*; class Main { public static void main (String[] args) { // 入力値の読み込み Scanner sc = new Scanner(System.in); int f = sc.nextInt(); int nt=55; int[] a =new int[9]; for(int m=0;m == 9;m++){ a[m] = sc.nextInt(); nt -= a[m]; } System.out.println(nt); } }