import Data.Char

main = interact $ unlines.map (show.(\[a,b,n] -> sumNthDecimal n $ div' a b).map read.words).lines

sumNthDecimal :: Int -> String -> Int
sumNthDecimal n str = sum.map digitToInt.take n.tail.dropWhile (/= '.') $ str

div' :: Int -> Int -> String
div' a b = show q ++ "." ++ div'' (10*r) b
  where (q,r) = quotRem a b

div'' :: Int -> Int -> String
div'' a b = show q ++ rest
  where (q,r) = quotRem a b
        rest = if r == 0 then []
                         else div'' (10*r) b