#include <bits/stdc++.h>
using namespace std;
int main() {
  list<int> a;
  int n, k, i, num, count = 0;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> num;
    a.push_front(num);
  }
  for (i = 0; i < n; i++) {
    if (a.front() <= k) {
      a.pop_front();
      count++;
      continue;
    }
    if (a.back() <= k) {
      a.pop_back();
      count++;
    }
  }
  cout << count;
  return 0;
}
