length, speed = gets.chomp.split(" ").map(&:to_i) count = 0 loop do length -= speed * 2 break if length <= 0 count += 1 end puts speed * count