let inp = readLine()!.split(separator: " ").map { Int($0)! }
let (A, B, N) = (inp[0], inp[1], inp[2])
let x = min(B, N)
let f = { (x: Int) in (x * A / B) - A * (x / B) }
var r = f(x)

for i in x...N {
    let y = f(x)
    if r < y { r = y }
}

print(r)
