fun main() {
    val l = readLine()!!.split(' ').map { it.toLong() }
    var k: Long
    if (l[2] >= l[1]) {
        k = l[1]-1
    } else {
        k = l[2]
    }


     val max = Math.floor(l[0].toDouble()*k.toDouble()/l[1].toDouble())-l[0].toDouble()*Math.floor(k.toDouble()/l[1].toDouble())

    println(max.toInt())
}

