import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int x2 = sc.nextInt();
		int x3 = sc.nextInt();
		int x4 = sc.nextInt();
		int x5 = sc.nextInt();
		int x[] = {x1, x2, x3, x4, x5};
		for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int x2 = sc.nextInt();
		int x3 = sc.nextInt();
		int x4 = sc.nextInt();
		int x5 = sc.nextInt();
		int x[] = {x1, x2, x3, x4, x5};
		for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		}
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int x2 = sc.nextInt();
		int x3 = sc.nextInt();
		int x4 = sc.nextInt();
		int x5 = sc.nextInt();
		int x[] = {x1, x2, x3, x4, x5};
		for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int x2 = sc.nextInt();
		int x3 = sc.nextInt();
		int x4 = sc.nextInt();
		int x5 = sc.nextInt();
		int x[] = {x1, x2, x3, x4, x5};
		for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int x1 = sc.nextInt(); x1 sc.nextInt() sc.nextInt sc int x2 = sc.nextInt(); x2 sc.nextInt() sc.nextInt sc int x3 = sc.nextInt(); x3 sc.nextInt() sc.nextInt sc int x4 = sc.nextInt(); x4 sc.nextInt() sc.nextInt sc int x5 = sc.nextInt(); x5 sc.nextInt() sc.nextInt sc int x[] = {x1, x2, x3, x4, x5}; x {x1, x2, x3, x4, x5} x1 x2 x3 x4 x5 for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		} int i=0; int i=0; i 0 i < x.length i x.length x x.length i++ i++ i {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		} {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		} if(x[i] == 0) {
				System.out.println(i + 1);
			} x[i] == 0 x[i] x i 0 {
				System.out.println(i + 1);
			} 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) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int x2 = sc.nextInt();
		int x3 = sc.nextInt();
		int x4 = sc.nextInt();
		int x5 = sc.nextInt();
		int x[] = {x1, x2, x3, x4, x5};
		for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int x2 = sc.nextInt();
		int x3 = sc.nextInt();
		int x4 = sc.nextInt();
		int x5 = sc.nextInt();
		int x[] = {x1, x2, x3, x4, x5};
		for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		}
	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int x1 = sc.nextInt();
		int x2 = sc.nextInt();
		int x3 = sc.nextInt();
		int x4 = sc.nextInt();
		int x5 = sc.nextInt();
		int x[] = {x1, x2, x3, x4, x5};
		for(int i=0; i < x.length; i++) {
			if(x[i] == 0) {
				System.out.println(i + 1);
			}
		}
	}

}