#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000 + 7;
int n, m;
int a[110];
int x;
int cnt[110];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    cin >> x;
    cnt[x]++;
  }
  int ans = 0;
  for (int day = 1; day <= 105; day++) {
    int num = 0;
    for (int i = 0; i <= 105; i++) {
      num += cnt[i] / day;
    }
    if (num >= n) ans = max(ans, day);
  }
  printf("%d\n", ans);
  return 0;
}
