#include <bits/stdc++.h>
using namespace std;
struct data {
  int v, m;
  data(const int &v, const int &m) {
    this->v = v;
    this->m = m;
  }
  data() {}
};
bool operator<(const data &a, const data &b) {
  return a.v * (b.m + 1) < (a.m + 1) * b.v;
}
priority_queue<data> Heap;
int n, m, a[105], cnts[105], ans = 2147483647;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &a[i]);
    ++cnts[a[i]];
  }
  for (int i = 1; i <= 100; ++i) {
    if (cnts[i]) {
      Heap.push(data(cnts[i], 0));
    }
  }
  for (int i = 1; i <= n; ++i) {
    data tmp = Heap.top();
    Heap.pop();
    Heap.push(data(tmp.v, tmp.m + 1));
  }
  while (!Heap.empty()) {
    data tmp = Heap.top();
    Heap.pop();
    if (tmp.m) {
      ans = min(ans, tmp.v / tmp.m);
    }
  }
  printf("%d\n", ans);
  return 0;
}
