import java.util.Scanner;

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

    Scanner sc = new Scanner(System.in);

    String[] a = sc.nextLine().split(" ");
    
    int[] nums = new int[a.length];
    
    for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    }
    
    for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    }
    
    


  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String[] a = sc.nextLine().split(" ");
    
    int[] nums = new int[a.length];
    
    for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    }
    
    for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    }
    
    


  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    String[] a = sc.nextLine().split(" ");
    
    int[] nums = new int[a.length];
    
    for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    }
    
    for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    }
    
    


  } main {

    Scanner sc = new Scanner(System.in);

    String[] a = sc.nextLine().split(" ");
    
    int[] nums = new int[a.length];
    
    for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    }
    
    for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    }
    
    


  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] a = sc.nextLine().split(" "); a sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int[] nums = new int[a.length]; nums new int[a.length] a.length a a.length for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    } int i=0; int i=0; i 0 i<nums.length i nums.length nums nums.length i++ i++ i {
      nums[i] = Integer.parseInt(a[i]);
    } {
      nums[i] = Integer.parseInt(a[i]);
    } nums[i] = Integer.parseInt(a[i]) nums[i] nums i Integer.parseInt(a[i]) Integer.parseInt Integer a[i] a i for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    } int i = 0; int i = 0; i 0 i<nums.length i nums.length nums nums.length i++ i++ i {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    } {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    } if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      } nums[i] == 0 nums[i] nums 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) {

    Scanner sc = new Scanner(System.in);

    String[] a = sc.nextLine().split(" ");
    
    int[] nums = new int[a.length];
    
    for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    }
    
    for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    }
    
    


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

    Scanner sc = new Scanner(System.in);

    String[] a = sc.nextLine().split(" ");
    
    int[] nums = new int[a.length];
    
    for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    }
    
    for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    }
    
    


  }
} Main
import java.util.Scanner;

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

    Scanner sc = new Scanner(System.in);

    String[] a = sc.nextLine().split(" ");
    
    int[] nums = new int[a.length];
    
    for(int i=0; i<nums.length; i++) {
      nums[i] = Integer.parseInt(a[i]);
    }
    
    for(int i = 0; i<nums.length; i++) {
      if (nums[i] == 0) {
        System.out.println(i+1);
        break;
      }
    }
    
    


  }
}