def main(argv)
	(n, d) = gets.chomp.split(' ').map(&:to_i)
	
  a = [0] * n
  
  c = 1
  i = 0
  while true do
    m = [i + (d * 2), n - 1].min
    
    (i..m).each do |j|
      a[j] = c
    end
    
    break if m == n - 1 
    
    c += 1
    i = m + 1
  end
  
  puts a[n - 1].to_s
end

if self.to_s === 'main'
	main(ARGV)
end