main = do
  li <- getLine
  let [a,b,n] = map read $ words li
  let ans = compute a b n
  print ans

compute :: Int -> Int -> Int -> Int
compute a b n
  | b >= n = fun a b n
  | True  = fun a b (n `div` b * b - 1)

fun :: Int -> Int -> Int -> Int
fun a b x = floor (a1 * x1 / b1) - a * floor (x1 / b1)
  where
    [a1,b1,x1] = map fromIntegral [a,b,x]
