TAIL = 1000000000000000000000000000
while gets
    a,b,n = $_.chomp.split.map(&:to_i)
    a *= TAIL

    k = (a/b - (a/b/TAIL).floor*TAIL)
    s = 0
    n.times do
        k *= 10
        s += k/TAIL
        k -= (k/TAIL).floor*TAIL
    end
    puts s
end