#include <bits/stdc++.h>
using namespace std;
const int maxn = 123;
int n, m, freq[maxn];
bool can(int x) {
  int tmp[maxn];
  for (int i = 0; i < maxn; i++) tmp[i] = freq[i];
  for (int j = 0; j < n; j++) {
    bool ate = false;
    for (int i = 0; i < maxn; i++) {
      if (tmp[i] >= x) {
        tmp[i] -= x;
        ate = true;
        break;
      }
    }
    if (!ate) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 0, x; i < m; i++) {
    cin >> x;
    freq[x]++;
  }
  int low = 0, high = 150, mid, ans = 0;
  while (high >= low) {
    mid = (high + low) / 2;
    if (can(mid)) {
      ans = mid;
      low = mid + 1;
    } else
      high = mid - 1;
  }
  cout << ans;
}
