#include <bits/stdc++.h>
using namespace std;
vector<int> v;
vector<int>::iterator it;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, i, a, b, j, t = 0, k = 0;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a;
    v.push_back(a);
  }
  while (v.size() > 0 && (v[0] <= k || v[v.size() - 1] <= k)) {
    if (v[0] <= k) {
      t++;
      v.erase(v.begin());
    }
    if (v.size() > 0 && v[v.size() - 1] <= k) {
      t++;
      v.pop_back();
    }
  }
  cout << t;
}
