/*package whatever //do not write package name here */

import java.io.*;
import java.util.Scanner;

class Main {
	public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	   for(int i=1 ; i<= 5 ; i++) {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   }
	}
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util class Main {
	public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	   for(int i=1 ; i<= 5 ; i++) {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   }
	}
} Main public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	   for(int i=1 ; i<= 5 ; i++) {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   }
	} main {
	    Scanner in = new Scanner(System.in);
	   for(int i=1 ; i<= 5 ; i++) {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   }
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) for(int i=1 ; i<= 5 ; i++) {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   } int i=1 ; int i=1 ; i 1 i<= 5 i 5 i++ i++ i {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   } {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   } int num = in.nextInt(); num in.nextInt() in.nextInt in if(num == 0)
	       System.out.println(i); num == 0 num 0 System.out.println(i) System.out.println System.out System System.out i String[] args args
/*package whatever //do not write package name here */

import java.io.*;
import java.util.Scanner;

class Main {
	public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	   for(int i=1 ; i<= 5 ; i++) {
	       int num = in.nextInt();
	       if(num == 0)
	       System.out.println(i);
	   }
	}
}