#include <bits/stdc++.h>
using namespace std;
long long n, m;
vector<long long> v(101);
long long check(long long x) {
  long long count = 0;
  for (long long i = 1; i < 101; i++) {
    count += v[i] / x;
  }
  return count >= n;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> m;
  for (long long i = 01; i <= 100; i++) v[i] = 0;
  for (long long i = 0; i < m; i++) {
    long long t;
    cin >> t;
    v[t]++;
  }
  long long l = 0;
  long long r = 1000;
  while (l < r) {
    long long mid = (l + r + 1) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid - 1;
  }
  cout << l;
  return 0;
}
