import java.util.*;
class Main{
     public static void main(String[] args) {
         Scanner sc=new Scanner(System.in);
         int x1=sc.nextInt();
         int x2=sc.nextInt();
         int x3=sc.nextInt();
         int x4=sc.nextInt();
         int x5=sc.nextInt();
         System.out.println(15-(x1+x2+x3+x4+x5));
     }
    
} import java.util.*; util.* java class Main{
     public static void main(String[] args) {
         Scanner sc=new Scanner(System.in);
         int x1=sc.nextInt();
         int x2=sc.nextInt();
         int x3=sc.nextInt();
         int x4=sc.nextInt();
         int x5=sc.nextInt();
         System.out.println(15-(x1+x2+x3+x4+x5));
     }
    
} Main public static void main(String[] args) {
         Scanner sc=new Scanner(System.in);
         int x1=sc.nextInt();
         int x2=sc.nextInt();
         int x3=sc.nextInt();
         int x4=sc.nextInt();
         int x5=sc.nextInt();
         System.out.println(15-(x1+x2+x3+x4+x5));
     } main {
         Scanner sc=new Scanner(System.in);
         int x1=sc.nextInt();
         int x2=sc.nextInt();
         int x3=sc.nextInt();
         int x4=sc.nextInt();
         int x5=sc.nextInt();
         System.out.println(15-(x1+x2+x3+x4+x5));
     } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int x1=sc.nextInt(); x1 sc.nextInt() sc.nextInt sc int x2=sc.nextInt(); x2 sc.nextInt() sc.nextInt sc int x3=sc.nextInt(); x3 sc.nextInt() sc.nextInt sc int x4=sc.nextInt(); x4 sc.nextInt() sc.nextInt sc int x5=sc.nextInt(); x5 sc.nextInt() sc.nextInt sc System.out.println(15-(x1+x2+x3+x4+x5)) System.out.println System.out System System.out 15-(x1+x2+x3+x4+x5) 15 (x1+x2+x3+x4+x5) x4 x3 x1+x2+x3+x4+x5 x1 x2 x3 x4 x5 String[] args args
import java.util.*;
class Main{
     public static void main(String[] args) {
         Scanner sc=new Scanner(System.in);
         int x1=sc.nextInt();
         int x2=sc.nextInt();
         int x3=sc.nextInt();
         int x4=sc.nextInt();
         int x5=sc.nextInt();
         System.out.println(15-(x1+x2+x3+x4+x5));
     }
    
}