#include<iostream>
using namespace std;
int main()
{
int n,m,t;
int a[101]={0};
cin>>n>>m;
for (int i=1;i<=m;i++)
{
cin>>t;
a[t];
}
int p;
int day=m/n;
while (day>0)
{
p=n;
for (int i=1;i<=100;i)
{
p-=a[i]/day;
if (p<=0)
{
cout<<day<<endl;
return 0;
}
}
day--;
}
cout<<0<<endl;
return 0;
}