l, k = gets.chomp.split(' ').map(&:to_f) eat = (l/k/2).floor if eat == 1.0 then puts 0 else puts (eat*k).to_i end