#include <bits/stdc++.h>
using namespace std;
const long long int Maxn3 = 1e3 + 10;
const long long int Maxn4 = 1e4 + 10;
const long long int Maxn5 = 1e5 + 10;
const long long int Maxn6 = 1e6 + 10;
const long long int Maxn7 = 1e7 + 10;
const long long int Maxn8 = 1e8 + 10;
const long long int Maxn9 = 1e9 + 10;
const long long int Maxn18 = 1e18 + 10;
const long long int Mod1 = 1e7 + 7;
const long long int Mod2 = 1e9 + 7;
const long long int LLMax = LLONG_MAX;
const long long int LLMin = LLONG_MIN;
const long long int INTMax = INT_MAX;
const long long int INTMin = INT_MIN;
long long int mn = LLMax, mx = LLMin;
long long int a[1000], b[1000];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  if (m < n) return cout << 0, 0;
  long long int l;
  for (long long int i = 1; i <= m; i++) cin >> l, a[l]++;
  for (long long int i = 1; i <= 100; i++) b[i] = a[i];
  sort(b + 1, b + 100 + 1);
  long long int ans = 0;
  for (long long int i = 1; i <= 100; i++) {
    long long int p = 0;
    for (long long int j = 100; j >= 100 - n + 1; j--)
      if (b[j] / i) p += b[j] / i;
    if (p >= n) ((ans) = max((ans), (i)));
  }
  return cout << ans, 0;
}
