#include <bits/stdc++.h>
using namespace std;
map<int,int> ma;
map<int,int> ::iterator it;
int main()
{
int cnt=0,n,lim,t;
cin>>n>>lim;
int m;
while(n--)
{
cin>>m;
ma[m/1000]++;//某一秒内来的请求数
}
int max = -1;
for(it=ma.begin(); it!=ma.end(); it++)
{
if(it->second > max)
max = it->second;
}
if(max <= n)
cout<<1<<endl;
else if(max % lim != 0)
cout<<max/lim+1<<endl;
else
cout<<max/lim<<endl;
return 0;
}