#include using namespace std; int main() { int box; int block; int block_size; int sum = 0; int cnt = 0; int max = 0; cin >> box; cin >> block; for (int i = 0; i < block; i++) { cin >> block_size; sum += block_size; if (box >= block_size) { cnt++; } else { if (max < cnt) { max = cnt; } } cout << max << endl; } }