#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 left = 0, right = n - 1;
  int res = 0;
  while (left <= right) {
    if (left == right) {
      if (a[left] <= k) res++;
      break;
    }
    if (a[left] <= k) {
      res++;
      left++;
    }
    if (a[right] <= k) {
      res++;
      right--;
    }
    if (a[left] > k && a[right] > k) break;
  }
  cout << res << endl;
  return 0;
}
