#include <bits/stdc++.h>
using namespace std;
int k, n, s;
int main() {
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] <= k) {
      s++;
      a[i] = k + 1;
    } else
      goto q;
  }
q:;
  for (int i = n - 1; i >= 0; i--) {
    if (a[i] <= k)
      s++;
    else
      goto p;
  }
p:;
  cout << s;
}
