#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  vector<int> v;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  if (k >= *max_element(v.begin(), v.end()))
    cout << n << endl;
  else {
    int h = 0;
    int h1 = v.size() - 1;
    int c = 0;
    int g1 = v[h];
    int g2 = v[h1];
    while (g1 <= k || g2 <= k) {
      if (g1 <= k) {
        c++;
        h++;
        g1 = v[h];
      } else if (g2 <= k) {
        c++;
        h1--;
        g2 = v[h1];
      }
    }
    cout << c << endl;
  }
  return 0;
}
