# include int main(void){ int i, j, L, N, tmp, count, W[10000]; count = 0; scanf("%d",&L); scanf("%d",&N); for( i = 0; i < N; i++){ scanf("%d",&W[i]); } for( i = 0; i < N - 1; i++){ for( j = i + 1; j < N; j++){ if( W[i] > W[j]){ tmp = W[i]; W[i] = W[j]; W[j] = tmp; } } } for( i = 0; i < L; i = W[i]){ count +=1; } printf("%d\n",count); return 0; }