import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N[] = new int[5];
        for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N[] = new int[5];
        for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N[] = new int[5];
        for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        }
    } main {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N[] = new int[5];
        for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N[] = new int[5]; N new int[5] 5 for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        } int i = 0; int i = 0; i 0 i < 5 i 5 i++ i++ i {
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        } {
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        } N[i] = sc.nextInt() N[i] N i sc.nextInt() sc.nextInt sc if(N[i] == 0){
                System.out.println(i+1);
            } N[i] == 0 N[i] N i 0 {
                System.out.println(i+1);
            } System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N[] = new int[5];
        for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N[] = new int[5];
        for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N[] = new int[5];
        for(int i = 0; i < 5; i++){
            N[i] = sc.nextInt();
            if(N[i] == 0){
                System.out.println(i+1);
            }
        }
    }
}
