#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { int n, m; cin >> n >> m; vector<int>counts(n, 0); int score = m; for (int i = 0; i < m; i++) { int number = 0; cin >> number; counts[number - 1]++; } cout << *min_element(counts.begin(),counts.end()) << endl; return 0; }