#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, s;
  cin >> n >> m;
  int a[110];
  for (int i = 1; i <= 100; i++) a[i] = 0;
  for (int i = 0; i < m; i++) {
    int t;
    cin >> t;
    a[t]++;
  }
  for (s = 1;; s++) {
    int ss = 0;
    for (int i = 1; i <= 100; i++) ss += a[i] / s;
    if (ss < n) break;
  }
  cout << s - 1;
}
