#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int sp = 0, ep = n - 1, c = 0;
  while (sp < ep) {
    if (a[sp] <= k) {
      sp++;
      c++;
    }
    if (a[ep] <= k) {
      ep--;
      c++;
    }
    if (a[sp] > k && a[ep] > k) break;
  }
  if (sp == ep)
    if (a[sp] <= k) c++;
  cout << c;
}
