#include <bits/stdc++.h>
using namespace std;
class Problem {
 public:
  Problem(int n, int k, const deque<int>& a) : _n(n), _k(k), _a(a) {}
  void Solve() {
    while (!_a.empty() && _a.front() <= _k) {
      _a.pop_front();
      ++answer;
    }
    while (!_a.empty() && _a.back() <= _k) {
      _a.pop_back();
      ++answer;
    }
  }
  void Print_answer() { cout << answer << endl; }

 private:
  int _n;
  int _k;
  deque<int> _a;
  int answer = 0;
};
int main() {
  int n, k;
  cin >> n >> k;
  deque<int> a;
  for (int i = 0; i < n; ++i) {
    int temp;
    cin >> temp;
    a.push_back(temp);
  }
  Problem problem(n, k, a);
  problem.Solve();
  problem.Print_answer();
  return 0;
}
