import java.util.*;
 
public class Main {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int[] x = new int[5];
		int sum = 0;
		for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		}
		System.out.println(15-sum);
	}
 
} import java.util.*; util.* java public class Main {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int[] x = new int[5];
		int sum = 0;
		for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		}
		System.out.println(15-sum);
	}
 
} Main public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int[] x = new int[5];
		int sum = 0;
		for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		}
		System.out.println(15-sum);
	} main {
		Scanner s = new Scanner(System.in);
		int[] x = new int[5];
		int sum = 0;
		for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		}
		System.out.println(15-sum);
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int[] x = new int[5]; x new int[5] 5 int sum = 0; sum 0 for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		} int i=0; int i=0; i 0 i<5 i 5 i++ i++ i {
			x[i] = s.nextInt();
			sum += x[i];
		} {
			x[i] = s.nextInt();
			sum += x[i];
		} x[i] = s.nextInt() x[i] x i s.nextInt() s.nextInt s sum += x[i] sum x[i] x i System.out.println(15-sum) System.out.println System.out System System.out 15-sum 15 sum String args[] args public class Main {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int[] x = new int[5];
		int sum = 0;
		for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		}
		System.out.println(15-sum);
	}
 
} public class Main {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int[] x = new int[5];
		int sum = 0;
		for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		}
		System.out.println(15-sum);
	}
 
} Main
import java.util.*;
 
public class Main {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int[] x = new int[5];
		int sum = 0;
		for(int i=0;i<5;i++){
			x[i] = s.nextInt();
			sum += x[i];
		}
		System.out.println(15-sum);
	}
 
}