import java.util.Scanner;

public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int arrys[] = new int[5];
		// sc.close();

		for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		}
		for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int arrys[] = new int[5];
		// sc.close();

		for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		}
		for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		}
	}
} Main public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int arrys[] = new int[5];
		// sc.close();

		for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		}
		for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		}
	} main {

		Scanner sc = new Scanner(System.in);
		int arrys[] = new int[5];
		// sc.close();

		for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		}
		for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int arrys[] = new int[5]; arrys new int[5] 5 for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		} int i = 0; int i = 0; i 0 i<arrys.length i arrys.length arrys arrys.length i++ i++ i {
			arrys[i] = sc.nextInt();
		} {
			arrys[i] = sc.nextInt();
		} arrys[i] = sc.nextInt() arrys[i] arrys i sc.nextInt() sc.nextInt sc for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		} int j = 0; int j = 0; j 0 j<arrys.length j arrys.length arrys arrys.length j++ j++ j {
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		} {
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		} if(0==arrys[j]){
				System.out.println(j+1);
			} 0==arrys[j] 0 arrys[j] arrys j {
				System.out.println(j+1);
			} System.out.println(j+1) System.out.println System.out System System.out j+1 j 1 String[] args args public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int arrys[] = new int[5];
		// sc.close();

		for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		}
		for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		}
	}
} public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int arrys[] = new int[5];
		// sc.close();

		for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		}
		for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		}
	}
} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args){

		Scanner sc = new Scanner(System.in);
		int arrys[] = new int[5];
		// sc.close();

		for(int i = 0; i<arrys.length; i++){
			arrys[i] = sc.nextInt();
		}
		for(int j = 0; j<arrys.length; j++){
			if(0==arrys[j]){
				System.out.println(j+1);
			}
		}
	}
}