import java.util.*;
import java.lang.Integer; 

public class Main {
  public static void main(String[] args){
    List<Integer> xList = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
      xList.add(sc.nextInt());
    }
    for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    }
  }
} import java.util.*; util.* java import java.lang.Integer; Integer java.lang public class Main {
  public static void main(String[] args){
    List<Integer> xList = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
      xList.add(sc.nextInt());
    }
    for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    }
  }
} Main public static void main(String[] args){
    List<Integer> xList = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
      xList.add(sc.nextInt());
    }
    for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    }
  } main {
    List<Integer> xList = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
      xList.add(sc.nextInt());
    }
    for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    }
  } List<Integer> xList = new ArrayList<Integer>(); xList new ArrayList<Integer>() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
      xList.add(sc.nextInt());
    } sc.hasNext() sc.hasNext sc {
      xList.add(sc.nextInt());
    } xList.add(sc.nextInt()) xList.add xList sc.nextInt() sc.nextInt sc for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    } int i=0; int i=0; i 0 i < xList.size() i xList.size() xList.size xList i++ i++ i {
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    } {
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    } if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      } xList.get(i).compareTo(Integer.valueOf(0)) == 0 xList.get(i).compareTo(Integer.valueOf(0)) xList.get(i).compareTo xList.get(i) xList.get xList i Integer.valueOf(0) Integer.valueOf Integer 0 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){
    List<Integer> xList = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
      xList.add(sc.nextInt());
    }
    for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    }
  }
} public class Main {
  public static void main(String[] args){
    List<Integer> xList = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
      xList.add(sc.nextInt());
    }
    for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    }
  }
} Main
import java.util.*;
import java.lang.Integer; 

public class Main {
  public static void main(String[] args){
    List<Integer> xList = new ArrayList<Integer>();
    Scanner sc = new Scanner(System.in);
    while(sc.hasNext()){
      xList.add(sc.nextInt());
    }
    for(int i=0;i < xList.size();i++){
      if(xList.get(i).compareTo(Integer.valueOf(0)) == 0){
    	System.out.println(i+1);
        break;
      }
    }
  }
}