main = do
    [a, b, n] <- map readInt . words <$> getLine
    print $ solve a b n

readInt :: String -> Int
readInt = read

solve a b n = foldl (\n m -> max n (f a b m)) (f a b 1) [1..n]
f a b x = ((a * x) `div` b) - a * ((x `div` b))