d = gets.to_i a, b = gets.split.map(&:to_i) puts [d * b + (a - b) * d, d * b].min