#include <bits/stdc++.h>
int main() {
  int n, k, a[110] = {0}, d, i, cnt, j;
  scanf("%d%d", &n, &k);
  for (j = 0; j < k; j++) {
    scanf("%d", &i);
    a[i]++;
  }
  d = k / n;
  while (d > 0) {
    cnt = 0;
    for (i = 0; i < 110; i++) cnt += a[i] / d;
    if (cnt >= n) break;
    d--;
  }
  printf("%d", d);
}
