#include <iostream>
using namespace std;
int main (){    
    int L;
    int N;
    cin>>L;
    cin>>N;
    int H[N];
    for (int i=0;i<N;i++){
        cin>>H[i];
        if (H[i]>=L)
        cout<<i;
        else if (i==N-1 and H[i]<L)
        cout<<"-1";
    }
}