#include <bits/stdc++.h>
using namespace std;
constexpr int kMaxFoodTypes = 100;
int main() {
  int people, food;
  cin >> people >> food;
  vector<int> count(kMaxFoodTypes, 0);
  for (int i = 0; i < food; ++i) {
    int type;
    cin >> type;
    count[type - 1] += 1;
  }
  vector<int> assigned(kMaxFoodTypes, 0);
  auto days = (1 << 20);
  for (int i = 0; i < people; ++i) {
    auto best_new_days = -1;
    auto best_type = -1;
    for (int type = 0; type < kMaxFoodTypes; ++type) {
      if (count[type] <= 0) {
        continue;
      }
      auto new_days = count[type] / (assigned[type] + 1);
      if (new_days > best_new_days) {
        best_new_days = new_days;
        best_type = type;
      }
    }
    days = min(days, best_new_days);
    assigned[best_type] += 1;
  }
  cout << days << "\n";
  return 0;
}
