import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
 
		Scanner sc = new Scanner(System.in);
		
		int [] x= {0,1,2,3,4,5};
		
		for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		}
		
		for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		}
		
 
	}
 
} import java.util.Scanner; Scanner java.util public class Main {
 
	public static void main(String[] args) {
 
		Scanner sc = new Scanner(System.in);
		
		int [] x= {0,1,2,3,4,5};
		
		for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		}
		
		for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		}
		
 
	}
 
} Main public static void main(String[] args) {
 
		Scanner sc = new Scanner(System.in);
		
		int [] x= {0,1,2,3,4,5};
		
		for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		}
		
		for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		}
		
 
	} main {
 
		Scanner sc = new Scanner(System.in);
		
		int [] x= {0,1,2,3,4,5};
		
		for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		}
		
		for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		}
		
 
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int [] x= {0,1,2,3,4,5}; x {0,1,2,3,4,5} 0 1 2 3 4 5 for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		} int i=1; int i=1; i 1 i<=5 i 5 i++ i++ i {
			x[i]=sc.nextInt();
		} {
			x[i]=sc.nextInt();
		} x[i]=sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		} int i=1; int i=1; i 1 i<=5 i 5 i++ i++ i {
			if(x[i]==0) {
				System.out.println(i);
			}
		} {
			if(x[i]==0) {
				System.out.println(i);
			}
		} if(x[i]==0) {
				System.out.println(i);
			} x[i]==0 x[i] x i 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 sc = new Scanner(System.in);
		
		int [] x= {0,1,2,3,4,5};
		
		for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		}
		
		for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		}
		
 
	}
 
} public class Main {
 
	public static void main(String[] args) {
 
		Scanner sc = new Scanner(System.in);
		
		int [] x= {0,1,2,3,4,5};
		
		for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		}
		
		for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		}
		
 
	}
 
} Main
import java.util.Scanner;
 
public class Main {
 
	public static void main(String[] args) {
 
		Scanner sc = new Scanner(System.in);
		
		int [] x= {0,1,2,3,4,5};
		
		for(int i=1; i<=5; i++) {
			x[i]=sc.nextInt();
		}
		
		for(int i=1; i<=5; i++) {
			if(x[i]==0) {
				System.out.println(i);
			}
		}
		
 
	}
 
}
