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