import java.util.Scanner;

public class Main{
	public static void main(String[] args){
      Scanner scanner = new Scanner(System.in);
      String input_text = scanner.nextLine();
      scanner.close();
      
      String[] str = input_text.split(" ", 0);
      
      for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      }
    }

} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
      Scanner scanner = new Scanner(System.in);
      String input_text = scanner.nextLine();
      scanner.close();
      
      String[] str = input_text.split(" ", 0);
      
      for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      }
    }

} Main public static void main(String[] args){
      Scanner scanner = new Scanner(System.in);
      String input_text = scanner.nextLine();
      scanner.close();
      
      String[] str = input_text.split(" ", 0);
      
      for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      }
    } main {
      Scanner scanner = new Scanner(System.in);
      String input_text = scanner.nextLine();
      scanner.close();
      
      String[] str = input_text.split(" ", 0);
      
      for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input_text = scanner.nextLine(); input_text scanner.nextLine() scanner.nextLine scanner scanner.close() scanner.close scanner String[] str = input_text.split(" ", 0); str input_text.split(" ", 0) input_text.split input_text " " 0 for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      } int i=0; int i=0; i 0 i<str.length i str.length str str.length i++ i++ i {
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      } {
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      } if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        } Integer.parseInt(str[i])==0 Integer.parseInt(str[i]) Integer.parseInt Integer str[i] str i 0 {
        	
          System.out.print(i+1);
          break;
        
        } System.out.print(i+1) System.out.print System.out System System.out i+1 i 1 break; String[] args args public class Main{
	public static void main(String[] args){
      Scanner scanner = new Scanner(System.in);
      String input_text = scanner.nextLine();
      scanner.close();
      
      String[] str = input_text.split(" ", 0);
      
      for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      }
    }

} public class Main{
	public static void main(String[] args){
      Scanner scanner = new Scanner(System.in);
      String input_text = scanner.nextLine();
      scanner.close();
      
      String[] str = input_text.split(" ", 0);
      
      for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      }
    }

} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
      Scanner scanner = new Scanner(System.in);
      String input_text = scanner.nextLine();
      scanner.close();
      
      String[] str = input_text.split(" ", 0);
      
      for(int i=0; i<str.length; i++){
		if (Integer.parseInt(str[i])==0){
        	
          System.out.print(i+1);
          break;
        
        }
      }
    }

}