#include <bits/stdc++.h>
using namespace std;
int n, k;
int main() {
  cin >> n >> k;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    v.push_back(tmp);
  }
  int i = 0;
  int j = n - 1;
  int cnt = 0;
  while (v[i] <= k || v[j] <= k) {
    if (v[i] <= k) {
      i++;
      cnt++;
      if (i > j) break;
    } else {
      j--;
      cnt++;
      if (i > j) break;
    }
  }
  cout << cnt;
  return 0;
}
