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