#include <iostream>
#include <vector>
using namespace std;
int main() {
    int N, L;
    cin >> N >> L;
    vector<int> Hn(N);
    
    for (int i = 0; i < N; ++i) {
        cin >> Hn[i];
    }
    
    int S = 1;
    for (int j = 0; j < N; ++j) {
        if (L < Hn[j]) {
            S += 1;
        } else {
            break;
        }
    }
    
    if (S >= N) {
        cout << -1 << endl;
    } else {
        cout << S << endl;
    }
    
    return 0;
}