#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, count = 0;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int l = 0, r = n - 1;
  while (l <= r) {
    if (a[l] <= k) {
      l++;
      count++;
    } else if (a[r] <= k) {
      r--;
      count++;
    } else
      break;
  }
  cout << count << endl;
  return 0;
}
