#include using namespace std; int main(){ int N,K,now,aite; cin >> N >> K; if(N%(K+1) == 1) now = 0; else if(N%(K+1) == 0) now = K; else now = N%(K+1)-1; cout << now << endl; while(1){ cin >> aite; if(aite >= N) break; now += K+1; cout << now << endl; } return 0; }