import java.util.Scanner;

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

        int[] ary = new int[5];
        for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        }

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

        int[] ary = new int[5];
        for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        }

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

        int[] ary = new int[5];
        for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        }

        for(int i=0; i<5; i++){
            if(ary[i] == 0){
                System.out.println((i+1));
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int[] ary = new int[5];
        for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        }

        for(int i=0; i<5; i++){
            if(ary[i] == 0){
                System.out.println((i+1));
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] ary = new int[5]; ary new int[5] 5 for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        } int i=0; int i=0; i 0 i<5 i 5 i++ i++ i {
            ary[i] = Integer.parseInt(sc.next());
        } {
            ary[i] = Integer.parseInt(sc.next());
        } ary[i] = Integer.parseInt(sc.next()) ary[i] ary i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(int i=0; i<5; i++){
            if(ary[i] == 0){
                System.out.println((i+1));
            }
        } int i=0; int i=0; i 0 i<5 i 5 i++ i++ i {
            if(ary[i] == 0){
                System.out.println((i+1));
            }
        } {
            if(ary[i] == 0){
                System.out.println((i+1));
            }
        } if(ary[i] == 0){
                System.out.println((i+1));
            } ary[i] == 0 ary[i] ary 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) {
        Scanner sc = new Scanner(System.in);

        int[] ary = new int[5];
        for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        }

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

        int[] ary = new int[5];
        for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        }

        for(int i=0; i<5; i++){
            if(ary[i] == 0){
                System.out.println((i+1));
            }
        }
    }
} Main
import java.util.Scanner;

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

        int[] ary = new int[5];
        for(int i=0; i<5; i++){
            ary[i] = Integer.parseInt(sc.next());
        }

        for(int i=0; i<5; i++){
            if(ary[i] == 0){
                System.out.println((i+1));
            }
        }
    }
}