import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int i=0;
		try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		int i=0;
		try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		}
	}
} Main public static void main(String[] args) {
		int i=0;
		try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		}
	} main {
		int i=0;
		try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		}
	} int i=0; i 0 try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		} {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		} Scanner scn = new Scanner(System.in) Scanner scn = new Scanner(System.in) new Scanner(System.in) while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			} true {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			} i++ i if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				} scn.nextInt() == 0 scn.nextInt() scn.nextInt scn 0 {
					System.out.println(i);
					break;
				} System.out.println(i) System.out.println System.out System System.out i break; String[] args args public class Main {
	public static void main(String[] args) {
		int i=0;
		try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		int i=0;
		try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int i=0;
		try (Scanner scn = new Scanner(System.in)) {
			while(true) {
				i++;
				if(scn.nextInt() == 0) {
					System.out.println(i);
					break;
				}
			}
		}
	}
}
