
fun main(args: Array<String>) {
    val (a, b, n) = readLine()!!.split(" ").map{ it.toLong() }

    val x = if(b > n) n else b - 1
    val value = Math.floor(a * x.toDouble() / b) - a * Math.floor(x.toDouble() / b)
    println(value.toInt())
}