import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [a, b, n] <- getIntList
    let (pa, qa) = a `divMod` b
        (pn, qn) = n `divMod` b
        qx = if pn == 0 then qn else b-1
    print $ pa * qx + (qa * qx) `div` b