#include <bits/stdc++.h>
long long i, j;
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  {
    long long n, k;
    cin >> n >> k;
    int a[n];
    int cnt = 0;
    for (int i = 0; i < n; i++) cin >> a[i];
    for (i = 0, j = n - 1; i <= j;) {
      if (a[i] <= k)
        i++;
      else if (a[j] <= k)
        j--;
      else
        break;
      cnt++;
    }
    cout << cnt;
    cout << "\n";
  }
  return 0;
}
