#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, solve = 0;
  cin >> n >> k;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int l = 0, r = n - 1;
  while (((arr[l] <= k) || (arr[r] <= k)) && (l <= r)) {
    if ((l == r) && (arr[l] <= k)) {
      solve++;
      break;
    }
    if (arr[l] <= k) {
      solve++;
      l++;
    }
    if (arr[r] <= k) {
      solve++;
      r--;
    }
  }
  cout << solve;
}
