#include <iostream>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
typedef long long LL;
const int N = 100010;
int n;
LL arr[N], p;
int main()
{
cin >> n >> p;
for (int i = 0; i < n; i ++ ) cin >> arr[i];
sort(arr, arr + n);
int res = 0;
for (int i = 0, j = 0; i < n; i ++ )
{
while (j < n && arr[i] > arr[j] * p) j ++ ;
res = max(res, i - j + 1);
}
cout << res << endl;
return 0;
}