#include <bits/stdc++.h>
using namespace std;
int ans;
int n, k;
int solve(vector<vector<int>> &dp, int A[], int i, int j) {
  if (j < i) return 0;
  if (dp[i][j] != -1) return dp[i][j];
  if (A[i] > k && A[j] > k) return dp[i][j] = 0;
  if (i == j) return dp[i][j] = 1;
  if (A[i] > k) {
    return dp[i][j] = 1 + solve(dp, A, i, j - 1);
  } else if (A[j] > k) {
    return dp[i][j] = 1 + solve(dp, A, i + 1, j);
  } else {
    return dp[i][j] = 1 + max(solve(dp, A, i, j - 1), solve(dp, A, i + 1, j));
  }
}
int main() {
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<int>> dp(n, vector<int>(n, -1));
  int x = solve(dp, a, 0, n - 1);
  cout << dp[0][n - 1] << endl;
  return 0;
}
