import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Main {
	public static void main(String[] args) {
		// code to read values
		// code to call required method
		// code to display the result
		// System.out.println(Math.ceil(2.5));
		Scanner sc = new Scanner(System.in);
		int[] arr = new int[5];
		for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		}
	}
} import java.io.*; io.* java import java.util.*; util.* java import java.text.*; text.* java import java.math.*; math.* java import java.util.regex.*; regex.* java.util public class Main {
	public static void main(String[] args) {
		// code to read values
		// code to call required method
		// code to display the result
		// System.out.println(Math.ceil(2.5));
		Scanner sc = new Scanner(System.in);
		int[] arr = new int[5];
		for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		}
	}
} Main public static void main(String[] args) {
		// code to read values
		// code to call required method
		// code to display the result
		// System.out.println(Math.ceil(2.5));
		Scanner sc = new Scanner(System.in);
		int[] arr = new int[5];
		for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		}
	} main {
		// code to read values
		// code to call required method
		// code to display the result
		// System.out.println(Math.ceil(2.5));
		Scanner sc = new Scanner(System.in);
		int[] arr = new int[5];
		for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] arr = new int[5]; arr new int[5] 5 for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		} int i=0; int i=0; i 0 i<5 i 5 i++ i++ i {
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		} {
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		} arr[i] = sc.nextInt() arr[i] arr i sc.nextInt() sc.nextInt sc if(arr[i]==0) System.out.println(i+1); arr[i]==0 arr[i] arr i 0 System.out.println(i+1) System.out.println System.out System System.out i+1 i 1 String[] args args public class Main {
	public static void main(String[] args) {
		// code to read values
		// code to call required method
		// code to display the result
		// System.out.println(Math.ceil(2.5));
		Scanner sc = new Scanner(System.in);
		int[] arr = new int[5];
		for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		}
	}
} public class Main {
	public static void main(String[] args) {
		// code to read values
		// code to call required method
		// code to display the result
		// System.out.println(Math.ceil(2.5));
		Scanner sc = new Scanner(System.in);
		int[] arr = new int[5];
		for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		}
	}
} Main
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Main {
	public static void main(String[] args) {
		// code to read values
		// code to call required method
		// code to display the result
		// System.out.println(Math.ceil(2.5));
		Scanner sc = new Scanner(System.in);
		int[] arr = new int[5];
		for(int i=0; i<5; i++){
			arr[i] = sc.nextInt();
			if(arr[i]==0) System.out.println(i+1);
		}
	}
}