import java.util.*; class Main { static int N; static int[] A; public static void main(String[] args) { Scanner sc = new Scanner(System.in); long sum = 0; for (int i = 0; i < 9; ++i) sum += sc.nextLong(); System.out.println(55 - sum); } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }