import java.util.Scanner; public class No481 { public static void main(String[]args) { Scanner sc = new Scanner(System.in); int []a = new int[9]; int sum=0; for(int i=0;i<9;i++) { a[i]=sc.nextInt(); sum +=a[i]; } System.out.println(55-sum); } }