import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
        int[] list = new int[5];
		for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		}
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
        int[] list = new int[5];
		for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
        int[] list = new int[5];
		for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		}
	} main {
		Scanner sn = new Scanner(System.in);
        int[] list = new int[5];
		for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		}
	} Scanner sn = new Scanner(System.in); sn new Scanner(System.in) int[] list = new int[5]; list new int[5] 5 for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		} int i =1; int i =1; i 1 i < 6 i 6 i++ i++ i {
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		} {
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		} int cnt = Integer.parseInt(sn.next()); cnt Integer.parseInt(sn.next()) Integer.parseInt Integer sn.next() sn.next sn if (cnt == 0){
				System.out.println(i);
			} cnt == 0 cnt 0 {
				System.out.println(i);
			} System.out.println(i) System.out.println System.out System System.out i String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
        int[] list = new int[5];
		for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
        int[] list = new int[5];
		for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		}
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
        int[] list = new int[5];
		for( int i =1; i < 6 ; i++ ){
			int cnt = Integer.parseInt(sn.next());
			if (cnt == 0){
				System.out.println(i);
			}
		}
	}
}

