#include<iostream> #include<vector> 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]++; } for (int i = 0; i < n; i++) { if (score > counts[i]) { score = counts[i]; } } cout << score << endl; return 0; }