import java.util.Scanner;
import java.util.Arrays;
import java.util.List;

public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String input = sc.nextLine();
		String[] array = input.split(" ");
		List<String> list = Arrays.asList(array);
	    System.out.println(list.indexOf("0") + 1);
	}
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String input = sc.nextLine();
		String[] array = input.split(" ");
		List<String> list = Arrays.asList(array);
	    System.out.println(list.indexOf("0") + 1);
	}
} Main public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String input = sc.nextLine();
		String[] array = input.split(" ");
		List<String> list = Arrays.asList(array);
	    System.out.println(list.indexOf("0") + 1);
	} main {
	    Scanner sc = new Scanner(System.in);
	    String input = sc.nextLine();
		String[] array = input.split(" ");
		List<String> list = Arrays.asList(array);
	    System.out.println(list.indexOf("0") + 1);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc String[] array = input.split(" "); array input.split(" ") input.split input " " List<String> list = Arrays.asList(array); list Arrays.asList(array) Arrays.asList Arrays array System.out.println(list.indexOf("0") + 1) System.out.println System.out System System.out list.indexOf("0") + 1 list.indexOf("0") list.indexOf list "0" 1 String[] args args public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String input = sc.nextLine();
		String[] array = input.split(" ");
		List<String> list = Arrays.asList(array);
	    System.out.println(list.indexOf("0") + 1);
	}
} public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String input = sc.nextLine();
		String[] array = input.split(" ");
		List<String> list = Arrays.asList(array);
	    System.out.println(list.indexOf("0") + 1);
	}
} Main
import java.util.Scanner;
import java.util.Arrays;
import java.util.List;

public class Main {
	public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
	    String input = sc.nextLine();
		String[] array = input.split(" ");
		List<String> list = Arrays.asList(array);
	    System.out.println(list.indexOf("0") + 1);
	}
}
