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