import java.util.Scanner; public class Yukicoder257 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), k = sc.nextInt(), now; int r = (n - 1) % (k + 1), o; now = r; System.out.println(now); while (true) { o = sc.nextInt(); if (o > n) return; now += (k + 1); System.out.println(now); } } }