fun main(args: Array<String>) {
    val (k, a, b) = readLine()!!.split(' ').map(String::toLong)
    if (k == 1L) {
        println(2)
        return
    }
    var dp0 = 1L
    var dp1 = 2L
    var dp2 = 0L
    for (i in 2..k) {
        dp2 = dp1 + 1
        if (a <= dp0) {
            dp2 = Math.max(dp2, dp0 - a + b)
        }
        dp0 = dp1
        dp1 = dp2
    }
    println(dp2)
}
