#include <bits/stdc++.h>
using namespace std;
typedef pair<int, string> pis;
typedef pair<int, int> pii;
typedef map<string, int> msi;
typedef map<int, string> mis;
typedef multimap<int, string> mmis;
typedef list<int> li;
typedef queue<int, li> qul;
typedef queue<int> qu;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vi::iterator itvi;
typedef msi::iterator itmsi;
typedef vector<char> vc;
typedef long long ll;
typedef vector<ll> vll;
int main(void) {
  int n, m, a;
  cin >> n >> m;
  vector<int> num_pkgs(101, 0);
  vector<int> num_ppl(101, 0);
  while (m--) {
    int pkg_type;
    cin >> pkg_type;
    num_pkgs[pkg_type]++;
  }
  int pkg_type, pkg_num, pkg_ppl;
  for (auto i = 1; i <= n; i++) {
    float temp_days = 0;
    float max_days = 0;
    int max_pkg_type;
    for (auto j = 1; j <= 100; j++) {
      if (num_pkgs[j] == 0) {
        continue;
      }
      pkg_type = j;
      pkg_num = num_pkgs[pkg_type];
      pkg_ppl = num_ppl[pkg_type];
      if (pkg_num != 0) {
        pkg_ppl++;
        temp_days = pkg_num / pkg_ppl * 1.0;
        if (temp_days > max_days) {
          max_days = temp_days;
          max_pkg_type = pkg_type;
        }
      }
    }
    num_ppl[max_pkg_type]++;
  }
  float min_days = 105;
  float rat;
  for (auto j = 1; j <= 100; j++) {
    if (num_pkgs[j] == 0) {
      continue;
    }
    pkg_type = j;
    pkg_num = num_pkgs[pkg_type];
    pkg_ppl = num_ppl[pkg_type];
    if (pkg_num != 0 and pkg_ppl != 0) {
      rat = pkg_num / pkg_ppl * 1.0;
      if (rat < min_days) {
        min_days = rat;
      }
    }
  }
  cout << int(min_days);
  return 0;
}
