import java.util.Scanner;
public class Stalaktiti {
    public static void main(String[] args){
    Scanner scanner =new Scanner(System.in);
    int n = scanner.nextInt();
    int[] stalaktiti = new int[n];
    for (int i =0; i <n; i++){
        stalaktiti[i] = scanner.nextInt();
    }
    int visinaPerice=1;
    for(int i=0; i<n; i++) {
        if(stalaktiti[i] < visinaPerice) {
            System.out.println(i + 1);
            return;
        }
    }
    Sstem.out.prinln("Prošao je kroz pecinu");
    }
}