#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, j, i, left, right, lft, r8, count;
  cin >> n >> k;
  int arr[n];
  for (i = 0; i < n; i++) cin >> arr[i];
  lft = 0;
  for (i = 0; i < n; i++) {
    if (arr[i] > k) {
      left = i;
      break;
    } else
      lft++;
  }
  r8 = 0;
  for (j = n - 1; j > 0; j--) {
    if (arr[j] > k) {
      right = j;
      break;
    } else
      r8++;
  }
  count = min(n, (lft + r8));
  cout << count << endl;
  return 0;
}
