#include <iostream>
using namespace std;

int main()
{
    int N,L,h;
    cin>>N>>L;
    int prolaz = 1;
    for(int i = 0;i<N;i++){
        cin>>h;
        if(h>L){
            prolaz++;
        }
        if(L>h){
            cout<<prolaz<<endl;
            break;
        }
        else if(prolaz==N){
            cout<<"-1"<<endl;
            break;
        }
    }
    return 0;
}