#include <iostream>
using namespace std;

int main() {
    int n, l;
    cin >> n >> l; 

    int visine[n]; 
n
    for (int i = 0; i < n; i++) 
    {
        cin >> visine[i];
    }
    for (int i = 0; i < n; i++) {
        if (visine[i] >= l) {
            cout << i - 1 << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}