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