#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, k;
cin >> n >> k;
int a[n + 5];
for(int i = 0; i < n; i++) {
cin >> a[i];
}
int ans = 0;
int pos = -1;
for(int i = 0; i < n; i++) {
if(k < a[i]) break;
if(k >= a[i]) ans++, pos = i;
}
for(int i = n - 1; i >= 0; i--) {
if(k < a[i]) break;
if(k >= a[i]) ans++;
}
cout << ans << "\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgaW9zOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogIGNpbi50aWUoMCk7CiAgaW50IG4sIGs7CiAgY2luID4+IG4gPj4gazsKICBpbnQgYVtuICsgNV07CiAgZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykgewogICAgY2luID4+IGFbaV07CiAgfQogIGludCBhbnMgPSAwOwogIGludCBwb3MgPSAtMTsKICBmb3IoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICBpZihrIDwgYVtpXSkgYnJlYWs7CiAgICBpZihrID49IGFbaV0pIGFucysrLCBwb3MgPSBpOwogIH0KICBmb3IoaW50IGkgPSBuIC0gMTsgaSA+PSAwOyBpLS0pIHsKICAgIGlmKGsgPCBhW2ldKSBicmVhazsKICAgIGlmKGsgPj0gYVtpXSkgYW5zKys7CiAgfQogIGNvdXQgPDwgYW5zIDw8ICJcbiI7CiAgcmV0dXJuIDA7Cn0=