#include <bits/stdc++.h>
using namespace std;
int dp[200005];
long long int mod = 1e9 + 7;
bool check(int d, vector<int> a, int n) {
  if (d == 0) return true;
  for (int i = 0; i < a.size(); i++) {
    n -= (a[i] / d);
  }
  if (n <= 0)
    return true;
  else
    return false;
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(m);
  for (auto &x : a) cin >> x;
  vector<int> fpc(101, 0);
  for (int i = 0; i < m; i++) fpc[a[i]]++;
  int h = *max_element(fpc.begin(), fpc.end()) + 1;
  int l = 0;
  int ans = 0;
  int mid;
  while (h > l) {
    mid = (l + h) / 2;
    if (check(mid, fpc, n)) {
      ans = mid;
      l = mid + 1;
    } else {
      h = mid;
    }
  }
  cout << ans << "\n";
  return 0;
}
