#include #include #include #include #include #include #include #include #include #include #include using namespace std; int main() { int n; long long k; cin >> n >> k; vector a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); long long ans = 0; for (int i = 0; i < n; i++) { int ok = n; int ng = 0; while (ok - ng > 1) { int mid = (ok + ng) / 2; if (a[i] * a[mid] >= 2 * k) { ok = mid; } else { ng = mid; } } ans += n - ok; } cout << ans << endl; return 0; }