#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  int left = 0;
  for (int i = 0; i < n; i++) {
    if (arr[i] > k)
      break;
    else {
      left++;
    }
  }
  int right = 0;
  for (int i = n - 1; i >= 0; i--) {
    if (arr[i] > k)
      break;
    else {
      right++;
    }
  }
  int ans = left + right;
  cout << min(ans, n) << endl;
  return 0;
}
