import Data.List

solve a b n = f n
  where
    f x = floor arg1 - (a * (floor arg2))
      where
        arg1 = (toDouble a) * (toDouble x) / (toDouble b)
        arg2 = (toDouble x) / (toDouble b)

toDouble :: Int -> Double
toDouble x = fromInteger $ toInteger x

main = do
  [a,b,n] <- map read . words <$> getLine :: IO [Int]
  let n' = min (b-1) n
  putStrLn . show $ solve a b n'

-- f x = floor(Ax/B) - A*floor(x/B)
-- f (x+B) =
-- floor(A(x+B)/B) - A*floor((x+B)/B)
-- floor(Ax/B + A) - A*floor(x/B+1)
-- floor(Ax/B) + A - A*floor(x/B) - A
-- floor(Ax/B) - A*floor(x/B)
