#include <bits/stdc++.h>
using namespace std;
int a, b, c, all[1000], tak[1000];
int solve(int numLeft) {
  if (numLeft == 0) return all[a - 1];
  for (int i = 0; i < 110; ++i) tak[i] = 1;
  int r = 1000000;
  for (int i = 0; i < numLeft; ++i) {
    int _max = -1, inx = -1;
    for (int i2 = 0; i2 < a - numLeft; ++i2) {
      if (all[i2] / (tak[i2] + 1) > _max) {
        inx = i2;
        _max = all[i2] / (tak[i2] + 1);
      }
    }
    _max = min(_max, all[a - numLeft - 1]);
    tak[inx]++;
    if (all[inx] / tak[inx] == 0) {
      return 0;
    }
    r = min(r, _max);
  }
  return r;
}
int main() {
  cin >> a >> b;
  for (int i = 0; i < b; ++i) {
    cin >> c;
    all[c]++;
  }
  sort(all, all + 101);
  reverse(all, all + 101);
  int _max = 0;
  for (int i = 0; i < a; ++i) {
    _max = max(solve(i), _max);
  }
  cout << _max << endl;
  return 0;
}
