import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner userInput = new Scanner(System.in);
        int output = 0;
        for (int i = 0; i < 5; i++) {

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

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

            int findOutput = userInput.nextInt();
            if (findOutput == 0) {
                output = i + 1;
            }
        }
        System.out.println(output);
    } main {
        Scanner userInput = new Scanner(System.in);
        int output = 0;
        for (int i = 0; i < 5; i++) {

            int findOutput = userInput.nextInt();
            if (findOutput == 0) {
                output = i + 1;
            }
        }
        System.out.println(output);
    } Scanner userInput = new Scanner(System.in); userInput new Scanner(System.in) int output = 0; output 0 for (int i = 0; i < 5; i++) {

            int findOutput = userInput.nextInt();
            if (findOutput == 0) {
                output = i + 1;
            }
        } int i = 0; int i = 0; i 0 i < 5 i 5 i++ i++ i {

            int findOutput = userInput.nextInt();
            if (findOutput == 0) {
                output = i + 1;
            }
        } {

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

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

            int findOutput = userInput.nextInt();
            if (findOutput == 0) {
                output = i + 1;
            }
        }
        System.out.println(output);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner userInput = new Scanner(System.in);
        int output = 0;
        for (int i = 0; i < 5; i++) {

            int findOutput = userInput.nextInt();
            if (findOutput == 0) {
                output = i + 1;
            }
        }
        System.out.println(output);
    }
}