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

public class Main {
    public static void main(String args[]) throws IOException {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String array[] = br.readLine().split(" ");

	for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 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 br = new BufferedReader(new InputStreamReader(System.in));
	String array[] = br.readLine().split(" ");

	for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	}
    }
} Main public static void main(String args[]) throws IOException {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String array[] = br.readLine().split(" ");

	for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	}
    } main {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String array[] = br.readLine().split(" ");

	for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	}
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String array[] = br.readLine().split(" "); array br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	} int i = 0; int i = 0; i 0 i < array.length i array.length array array.length i++ i++ i {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	} {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	} if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    } Integer.parseInt(array[i]) == 0 Integer.parseInt(array[i]) Integer.parseInt Integer array[i] array 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 br = new BufferedReader(new InputStreamReader(System.in));
	String array[] = br.readLine().split(" ");

	for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	}
    }
} public class Main {
    public static void main(String args[]) throws IOException {

	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	String array[] = br.readLine().split(" ");

	for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 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 br = new BufferedReader(new InputStreamReader(System.in));
	String array[] = br.readLine().split(" ");

	for (int i = 0; i < array.length; i++) {
	    if (Integer.parseInt(array[i]) == 0) {
		System.out.println(i + 1);
		break;
	    }
	}
    }
}
