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