#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long t = 1;
  while (t--) solve();
}
void solve() {
  int n, k;
  cin >> n >> k;
  int ar[n];
  for (long i = 0; i < n; i++) cin >> ar[i];
  long count = 0;
  int mx = -1;
  for (long i = 0; i < n; i++) {
    if (ar[i] > k) break;
    count++;
    mx = i;
  }
  for (long i = n - 1; i >= 0; i--) {
    if (ar[i] > k || i == mx) break;
    count++;
  }
  cout << count << endl;
  ;
}
