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