#include <iostream>

using namespace std;

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