import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] x = new int[5];
        for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        }

        System.out.println(solve(x));

        sc.close();
    }

    static int solve(int[] x) {
        return 15 - Arrays.stream(x).sum();
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] x = new int[5];
        for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        }

        System.out.println(solve(x));

        sc.close();
    }

    static int solve(int[] x) {
        return 15 - Arrays.stream(x).sum();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] x = new int[5];
        for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        }

        System.out.println(solve(x));

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        int[] x = new int[5];
        for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        }

        System.out.println(solve(x));

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] x = new int[5]; x new int[5] 5 for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < x.length i x.length x x.length ++i ++i i {
            x[i] = sc.nextInt();
        } {
            x[i] = sc.nextInt();
        } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc System.out.println(solve(x)) System.out.println System.out System System.out solve(x) solve x sc.close() sc.close sc String[] args args static int solve(int[] x) {
        return 15 - Arrays.stream(x).sum();
    } solve {
        return 15 - Arrays.stream(x).sum();
    } return 15 - Arrays.stream(x).sum(); 15 - Arrays.stream(x).sum() 15 Arrays.stream(x).sum() Arrays.stream(x).sum Arrays.stream(x) Arrays.stream Arrays x int[] x x public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] x = new int[5];
        for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        }

        System.out.println(solve(x));

        sc.close();
    }

    static int solve(int[] x) {
        return 15 - Arrays.stream(x).sum();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] x = new int[5];
        for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        }

        System.out.println(solve(x));

        sc.close();
    }

    static int solve(int[] x) {
        return 15 - Arrays.stream(x).sum();
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int[] x = new int[5];
        for (int i = 0; i < x.length; ++i) {
            x[i] = sc.nextInt();
        }

        System.out.println(solve(x));

        sc.close();
    }

    static int solve(int[] x) {
        return 15 - Arrays.stream(x).sum();
    }
}