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