func readArrayInt() -> [Int] {
    readLine()!.split(separator: " ").map({Int($0)!})
}

let line = readArrayInt()
let (A, B, N) = (line[0], line[1], line[2])
let x = min(B - 1, N)
print(A * x / B - A * (x / B))
