q[20010],m,x=1e6,s,*p;main(j){for(scanf("%d%*d",&m),q[m]--;~scanf("%d",&j);x>j?x=j:0)for(p=q+10000;q-p--;p[j]&&p[j]<=*p?*p=p[j]-1:0);for(s=m/x;++j