#include <bits/stdc++.h>
int main() {
  int n, k, i, count = 0;
  scanf("%d%d", &n, &k);
  int arr[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  int a = 0, b = n - 1;
  for (i = 0; i < n; i++) {
    if (arr[a] > k && arr[b] > k) {
      break;
    } else if (arr[a] <= k) {
      count++;
      a++;
    } else if (arr[b] <= k) {
      count++;
      b--;
    }
  }
  printf("%d\n", count);
  return 0;
}
