import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        }
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        }
    } main {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        }
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String[] s = reader.readLine().split(" "); s reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        } int i = 0; int i = 0; i 0 i < s.length i s.length s s.length i++ i++ i {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        } {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        } if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            } s[i].equals("0") s[i].equals s[i] s i "0" {
                System.out.println(i+1);
                break;
            } System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 break; String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        }
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String[] s = reader.readLine().split(" ");
        for (int i = 0; i < s.length; i++) {
            if (s[i].equals("0")) {
                System.out.println(i+1);
                break;
            }
        }
    }
}
