import java.util.*;
class Main{
  static Scanner sc = new Scanner(System.in);
  public static void main(String[] args){
    int x[] = new int[9999999];
    for(int i=0;i<5;i++){
      x[sc.nextInt()]=i;
    }
    System.out.println(x[0]+1);
  }
} import java.util.*; util.* java class Main{
  static Scanner sc = new Scanner(System.in);
  public static void main(String[] args){
    int x[] = new int[9999999];
    for(int i=0;i<5;i++){
      x[sc.nextInt()]=i;
    }
    System.out.println(x[0]+1);
  }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args){
    int x[] = new int[9999999];
    for(int i=0;i<5;i++){
      x[sc.nextInt()]=i;
    }
    System.out.println(x[0]+1);
  } main {
    int x[] = new int[9999999];
    for(int i=0;i<5;i++){
      x[sc.nextInt()]=i;
    }
    System.out.println(x[0]+1);
  } int x[] = new int[9999999]; x new int[9999999] 9999999 for(int i=0;i<5;i++){
      x[sc.nextInt()]=i;
    } int i=0; int i=0; i 0 i<5 i 5 i++ i++ i {
      x[sc.nextInt()]=i;
    } {
      x[sc.nextInt()]=i;
    } x[sc.nextInt()]=i x[sc.nextInt()] x sc.nextInt() sc.nextInt sc i System.out.println(x[0]+1) System.out.println System.out System System.out x[0]+1 x[0] x 0 1 String[] args args
import java.util.*;
class Main{
  static Scanner sc = new Scanner(System.in);
  public static void main(String[] args){
    int x[] = new int[9999999];
    for(int i=0;i<5;i++){
      x[sc.nextInt()]=i;
    }
    System.out.println(x[0]+1);
  }
}