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