import Control.Applicative
import Text.Printf
import Data.Char
main = do
  v <- map (map (read::String->Int) . words) . lines <$> getContents
  mapM_ (putStrLn . show . aux) v

aux::[Int] -> Int
aux [a, b, n] = let 
  c = (fromIntegral(a) / fromIntegral(b))::Double
  s = take n . drop 1 . dropWhile (\x->x /= '.') . printf "%.100f" $ c
  t = map (\x->ord(x)-ord('0')) s
  in sum t