import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        }


    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        }


    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        }


    } main {
        Scanner scan = new Scanner(System.in);
        for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        }


    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        } int i=1; int i=1; i 1 i <= 5 i 5 i++ i++ i {
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        } {
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        } if (scan.nextInt() != i){
                System.out.println(i);
                break;
            } scan.nextInt() != i scan.nextInt() scan.nextInt scan i {
                System.out.println(i);
                break;
            } System.out.println(i) System.out.println System.out System System.out i break; String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        }


    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        }


    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        for (int i=1; i <= 5; i++){
            if (scan.nextInt() != i){
                System.out.println(i);
                break;
            }
        }


    }
}
