
import java.util.*;
import java.io.*;

import static java.lang.Character.isUpperCase;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String[] S = new String[100];
        // ["", "","" ,"" ,"", ... ]
        // [0, 0, 0, 0, 0, ... ]
        // "" - String, '' - Char

        int[] iVal = new int[5]; // [0, 0, 0, 0, 0]
        // iVal = [0,1,2,3,4]

        // iVal = [3, 5, 7, 9, 11]

        for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        }

        }









    }


 import java.util.*; util.* java import java.io.*; io.* java import static java.lang.Character.isUpperCase; import static java.lang.Character.isUpperCase; import static java.lang.Character.isUpperCase; public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String[] S = new String[100];
        // ["", "","" ,"" ,"", ... ]
        // [0, 0, 0, 0, 0, ... ]
        // "" - String, '' - Char

        int[] iVal = new int[5]; // [0, 0, 0, 0, 0]
        // iVal = [0,1,2,3,4]

        // iVal = [3, 5, 7, 9, 11]

        for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        }

        }









    } Main public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String[] S = new String[100];
        // ["", "","" ,"" ,"", ... ]
        // [0, 0, 0, 0, 0, ... ]
        // "" - String, '' - Char

        int[] iVal = new int[5]; // [0, 0, 0, 0, 0]
        // iVal = [0,1,2,3,4]

        // iVal = [3, 5, 7, 9, 11]

        for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        }

        } main {

        Scanner in = new Scanner(System.in);

        String[] S = new String[100];
        // ["", "","" ,"" ,"", ... ]
        // [0, 0, 0, 0, 0, ... ]
        // "" - String, '' - Char

        int[] iVal = new int[5]; // [0, 0, 0, 0, 0]
        // iVal = [0,1,2,3,4]

        // iVal = [3, 5, 7, 9, 11]

        for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        }

        } Scanner in = new Scanner(System.in); in new Scanner(System.in) String[] S = new String[100]; S new String[100] 100 int[] iVal = new int[5]; iVal new int[5] 5 for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        } int i = 0; int i = 0; i 0 i < 5 i 5 i+=1 i+=1 i 1 {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        } {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        } iVal[i] = in.nextInt() iVal[i] iVal i in.nextInt() in.nextInt in if(iVal[i]==0)
            {
                System.out.println(i+1);
            } iVal[i]==0 iVal[i] iVal 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 in = new Scanner(System.in);

        String[] S = new String[100];
        // ["", "","" ,"" ,"", ... ]
        // [0, 0, 0, 0, 0, ... ]
        // "" - String, '' - Char

        int[] iVal = new int[5]; // [0, 0, 0, 0, 0]
        // iVal = [0,1,2,3,4]

        // iVal = [3, 5, 7, 9, 11]

        for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        }

        }









    } public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String[] S = new String[100];
        // ["", "","" ,"" ,"", ... ]
        // [0, 0, 0, 0, 0, ... ]
        // "" - String, '' - Char

        int[] iVal = new int[5]; // [0, 0, 0, 0, 0]
        // iVal = [0,1,2,3,4]

        // iVal = [3, 5, 7, 9, 11]

        for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        }

        }









    } Main

import java.util.*;
import java.io.*;

import static java.lang.Character.isUpperCase;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        String[] S = new String[100];
        // ["", "","" ,"" ,"", ... ]
        // [0, 0, 0, 0, 0, ... ]
        // "" - String, '' - Char

        int[] iVal = new int[5]; // [0, 0, 0, 0, 0]
        // iVal = [0,1,2,3,4]

        // iVal = [3, 5, 7, 9, 11]

        for(int i = 0; i < 5; i+=1) {

            iVal[i] = in.nextInt();
            if(iVal[i]==0)
            {
                System.out.println(i+1);
            }


        }

        }









    }



