#include <bits/stdc++.h>
using namespace std;
const int N = 100 + 2;
int n, m, mn = 1e9;
pair<int, int> ar[N];
bool cmp(pair<int, int> a, pair<int, int> b) {
  return (a.first / (a.second + 1)) > (b.first / (b.second + 1));
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a;
    cin >> a;
    a--;
    ar[a].first++;
  }
  for (int i = 0; i < n; i++) {
    sort(ar, ar + 100, cmp);
    ar[0].second++;
  }
  for (int i = 0; i < n; i++)
    if (ar[i].second) mn = min(mn, ar[i].first / (ar[i].second));
  cout << mn;
}
