import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] numbers = sc.nextLine().split(" ", 0);
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] numbers = sc.nextLine().split(" ", 0);
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] numbers = sc.nextLine().split(" ", 0);
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    }
  } main {
    Scanner sc = new Scanner(System.in);
    String[] numbers = sc.nextLine().split(" ", 0);
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] numbers = sc.nextLine().split(" ", 0); numbers sc.nextLine().split(" ", 0) sc.nextLine().split sc.nextLine() sc.nextLine sc " " 0 for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    } int i = 0; int i = 0; i 0 i < numbers.length i numbers.length numbers numbers.length i++ i++ i {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    } {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    } if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      } numbers[i].equals("0") numbers[i].equals numbers[i] numbers 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[] numbers = sc.nextLine().split(" ", 0);
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    }
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] numbers = sc.nextLine().split(" ", 0);
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    }
  }
} Main
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String[] numbers = sc.nextLine().split(" ", 0);
    for (int i = 0; i < numbers.length; i++) {
      if (numbers[i].equals("0")) {
        System.out.println(i + 1);
        break;
      }
    }
  }
}
