#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int N, K;
    cin >> N >> K;

    vector<int> a(N);
    for (int i = 0; i < N; i++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());

    int l = 0, r = N - 1;
    int ans = 0;
    while(l < r) {
        if(a[l] + a[r] <= K) {
            l++;
            r--;
            ans++;
        }

        else {
            r--;
        }
    }

    cout << N - ans << endl;
}
