#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n;  
    int h;  
    
    cin >> n >> h; 
    
    vector<int> arr(n);

    for (int i = 0; i < n; ++i) {
        cin >> arr[i];  
    }

    int counter = 0;
    
    for (int i = 0; i < n; ++i) {
        if(arr[i] >= h){
            counter++;
        }
    }
    if(counter == 0){
        return -1;
    }
    if(counter>=n){
        return -1;
    }
    else{
        cout << counter++;
    }
    

    return 0;
}