#include <iostream>
#include <algorithm>
using namespace std;
 
int main() {
	int n,x;
	cin >> n >> x;
	int p[n];
	for (int i=0;i<n;i++) {
		cin >> p[i];
	}
	sort(p,p+n);
	int i=0,j=n-1,d=0;
	while (i<=j) {
		if (p[i]+p[j]<=x) {
			i++;
		}
		j--;
		d++;
	}
	cout << d;
}
				I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbix4OwoJY2luID4+IG4gPj4geDsKCWludCBwW25dOwoJZm9yIChpbnQgaT0wO2k8bjtpKyspIHsKCQljaW4gPj4gcFtpXTsKCX0KCXNvcnQocCxwK24pOwoJaW50IGk9MCxqPW4tMSxkPTA7Cgl3aGlsZSAoaTw9aikgewoJCWlmIChwW2ldK3Bbal08PXgpIHsKCQkJaSsrOwoJCX0KCQlqLS07CgkJZCsrOwoJfQoJY291dCA8PCBkOwp9