#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int MAX = 1000005;
int SetBit(int n, int x) { return n | (1 << x); }
int ClearBit(int n, int x) { return n & ~(1 << x); }
int ToggleBit(int n, int x) { return n ^ (1 << x); }
bool CheckBit(int n, int x) { return (bool)(n & (1 << x)); }
int main(void) {
  int n, k, i, val;
  while (scanf("%d %d", &n, &k) != EOF) {
    deque<int> d;
    for (i = 0; i < n; i++) {
      scanf("%d", &val);
      d.push_back(val);
    }
    int ans = 0;
    while (1) {
      if ((d.front() > k && d.back() > k) || d.empty()) break;
      if (d.front() <= k) {
        d.pop_front();
        ++ans;
        if (d.empty()) break;
      }
      if (d.back() <= k) {
        d.pop_back();
        ++ans;
        if (d.empty()) break;
      }
    }
    printf("%d\n", ans);
  }
  return 0;
}
