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