#include <bits/stdc++.h>
using namespace std;
int ar[105];
int main() {
  int n, m;
  cin >> m >> n;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    ar[a]++;
  }
  int ans = 0;
  int l = 0;
  int r = n;
  int mid;
  while (l <= r) {
    mid = (l + r) / 2;
    int j = 0;
    int yes = 0;
    int tmp = 0;
    for (int i = 0; i < m && j < 105; i++) {
      while (j < 105 && ar[j] - tmp < mid) {
        j++;
        tmp = 0;
      }
      if (j == 105) break;
      if (ar[j] - tmp >= mid) {
        tmp += mid;
      }
      if (i == m - 1) {
        yes = 1;
      }
    }
    if (yes == 1) {
      ans = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  printf("%d\n", ans);
}
