def solve
  n, d = readline.split.map!(&:to_i)
  ans = 0
  for num in 1..n do
    if num - d == 1 then
      start_num = num - d
      end_num = num + d
    end
  end
  if n % end_num != 0 then
    ans = n/end_num+1
  else
    ans = n/end_num
  end
  print ans
end

solve