#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, x, b, i = 0;
  cin >> N >> x;
  int a[N + 1];
  for (b = 0; b < N; b++) {
    cin >> a[b];
    sort(a, a + N, greater<int>());
  }
  for (b = 1; b < N; b++) {
    if (a[b] <= x - a[b + 1]) {
      i += 1;
    }
  }
  cout << i << endl;
}
