#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int total = 0;
  bool streak = true;
  bool done[n];
  fill(done, done + n, false);
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] <= k && streak) {
      total++;
      done[i] = true;
    } else
      streak = false;
  }
  streak = true;
  for (int i = n - 1; i >= 0; i--) {
    if (streak && arr[i] <= k && done[i] == false)
      total++;
    else
      break;
  }
  cout << total;
}
