#include using namespace std; int main(void){ int N,Q; cin >> N >> Q; vector dp(N+1); vector sum(N+1); dp[1] = 1; for( int i = 1; i <= N; i++ ) { sum[i] = dp[i]+sum[i-1]; for( int j = 2; i*j <= N; j++ ) { dp[i*j] += dp[i]; } } for( int i = 0; i < Q; i++ ) { int x; cin >> x; printf("%ld\n",dp[x]*sum[N/x]); } }