let inp = readLine()!.split(separator: " ").map { Int($0)! }
let (A, B, N) = (inp[0], inp[1], inp[2])
var x = min(B, N)
if N > B {
    let g = { (n: Int) in (n-1).isMultiple(of: B) }
    x = max(x, (1...N).reversed().first(where: g)!)
}
let f = { (x: Int) in (x * A / B) - A * (x / B) }
var r = f(x)

print(r)
