#include <bits/stdc++.h>
using namespace std;
const long long inf = 100100100100100;
const long long mod = 1000000007;
signed main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  long long n;
  cin >> n;
  long long x;
  cin >> x;
  vector<long long> arr;
  for (long long i = 0; i < n; i++) {
    long long t;
    cin >> t;
    arr.push_back(t);
  }
  sort(arr.begin(), arr.end());
  long long cnt = 0;
  long long i = 0;
  while (i < n && x - arr[i] >= 0) {
    cnt++;
    i++;
  }
  if (x < arr[i] || x == 0) {
    cout << cnt << endl;
  } else if (i == n && x > 0) {
    cout << cnt - 1 << endl;
  }
}
