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