a,b=gets.split.map(&:to_i) if a <= 2 * b puts 0 else puts (a / (2 * b)) * b end