//* Problem  : 2404 - Bin Packing
//* Contest  : acm.tju.edu.cn
//* Type     : Solution
//* Date     : 2007.08.01
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

int a[100000];

int cmp_f(const void *a, const void *b)
{
	int *aa = (int*)a, *bb = (int*)b;
	return -(aa[0] - bb[0]);
}

int main()
{
	int i, n, min, max, res, l;
	scanf("%i %i", &n, &l);
	for (i = 0; i < n; i++)
		scanf("%i", &a[i]);
	qsort(a, n, 4, cmp_f);
	min = 0; max = n - 1; res = 0;
	while (max >= min)
	{
		res++;
		if (a[max] + a[min] <= l) max--;
		min++;
	}
	printf("%i\n", res);
}