d = read_line.to_i64 a, b = read_line.split.map(&.to_i64) x = a > b ? 0 : d puts (x * a + (d - x) * b).to_i