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; while (now < n) { sc.next(); System.out.println(now); now += (k + 1); } } }