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