#include <bits/stdc++.h>
using namespace std;
template <typename T>
using V = vector<T>;
template <typename T, typename U>
using umap = unordered_map<T, U>;
template <typename T>
using uset = unordered_set<T>;
template <typename T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
using max_heap = priority_queue<T>;
int main() {
  ios::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  deque<int> q;
  for (int i = 0; i < n; ++i) {
    int v;
    cin >> v;
    q.push_back(v);
  }
  while (not q.empty()) {
    if (q.front() > k and q.back() > k) {
      break;
    } else {
      if (q.front() <= k) q.pop_front();
      if (not q.empty() and q.back() <= k) q.pop_back();
    }
  }
  cout << n - q.size() << endl;
}
