#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  vector<int> freq(101, 0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    freq[t]++;
  }
  int maxx = 0;
  for (int i = 1; i <= 100; i++) {
    int pack = 0;
    for (int j = 1; j <= 100; j++) {
      pack = pack + (freq[j] / i);
    }
    if (pack >= n)
      maxx = max(maxx, i);
    else
      break;
  }
  cout << maxx << endl;
  return 0;
}
