#include <bits/stdc++.h>
const int maxn = 1e4 + 10;
const int mod = 1e9 + 7;
const int inf = 1e9;
using namespace std;
int main() {
  int x, y;
  while (cin >> x >> y) {
    deque<int> q;
    int n;
    for (int i = 0; i < x; i++) {
      scanf("%d", &n);
      q.push_back(n);
    }
    while (q.size() > 0) {
      int flog = 0;
      if (q.front() <= y) {
        q.pop_front();
        flog = 1;
      }
      if (q.empty()) break;
      if (q.back() <= y) {
        q.pop_back();
        flog = 1;
      }
      if (!flog) break;
    }
    cout << x - q.size() << endl;
  }
  return 0;
}
