#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, k;
  cin >> n >> k;
  long long int s = k * 2 + 1;
  long long int t = n / s;
  long long int w = n % s;
  if (w != 0)
    t++;
  else
    w = k * 2;
  cout << t << "\n";
  for (int i = 1 + w / 2; i <= n; i += s) cout << i << " ";
}
