using System; using System.Collections.Generic; using System.Linq; public class Test { public static void Main() { var list = Console.ReadLine() .Split(' ') .Select(x => int.Parse(x)) .ToList(); var n = list[0]; var k = list[1]; var next = (n - 1) % (k + 1); Console.WriteLine(next); next += k + 1; while(true) { var d = int.Parse(Console.ReadLine()); if(d >= n) break; else { Console.WriteLine(next); next += k + 1; } } } }