leng, eat = gets.chomp.split(" ").map(&:to_i) puts leng / (eat * 2) > 1 ? (leng / (eat * 2)) * eat : 0