import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int b = 0; for(int i = 0; i<=8; i++){ int a = sc.nextInt(); b +=1; if(a!=b){ System.out.println(b); break; } } System.out.println(10); } }