#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int p1 = 0, p2 = n - 1, rez = 0;
  while ((a[p1] <= k || a[p2] <= k) && p1 < p2) {
    if (a[p1] <= k) {
      p1++;
      rez++;
    }
    if (a[p2] <= k) {
      p2--;
      rez++;
    }
  }
  if (p1 == p2 && a[p1] <= k) rez++;
  cout << rez;
}
