fun main() {
    val (a, b, n) = readLine()!!.split(" ").map(String::toLong).toLongArray()

    val c = if (n >= b) {
        b - 1
    } else {
        n
    }.toDouble()

    val result = (Math.floor(a * c / b).toLong() - a * Math.floor(c / b).toLong())
    println(result)
}



