#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const int INF = 0x3f3f3f3f;
const int LINF = 0x3f3f3f3f3f3f3f3f;
const double EPS = 1e-16;
int N, M, cnt[101];
bool isPos(int d) {
  int n = N;
  for (int i = 0; i < 101; i++) {
    n -= cnt[i] / d;
    if (n <= 0) break;
  }
  return n <= 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << setprecision(64) << fixed;
  cin >> N >> M;
  for (int i = 0; i < M; i++) {
    int a;
    cin >> a;
    cnt[a]++;
  }
  int bot = 0, top = 101;
  while (bot < top - 1) {
    int m = (bot + top) / 2;
    if (isPos(m))
      bot = m;
    else
      top = m;
  }
  cout << bot << '\n';
  return 0;
}
