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

int main()
{
    int n, k;
    cin >> n >> k;
    vector<int> arr(n);
    for(int i=0; i<n; i++)
        cin >> arr[i];

    sort(arr.begin(), arr.end());

    int i = 0, j = n-1, res = 0;
    while(i < j) {
        if(arr[i] + arr[j] <= k){
            i++;
            j--;
        } else {
            j--;
        }
        res++;
    }

    if(i == j) res++;

    cout << res << '\n';

    return 0;
}