fun main(args: Array) { val d = readLine()!!.toInt() val (a,b) = readLine()!!.split(" ").map { it.toInt() } val ans = (0..d).map { a*it + (d-it)*b }.minOrNull() println(ans) }