#include <iostream>
#include <cmath>

int main() {
    long long int n;
    double a, b;
    
    while (std::cin >> a >> b >> n) {
        long long int ans = 0;
        a /= b;

        for (long long int i = 0; i < n; ++i) {
            a -= (long long int) a;
            a *= 10.;
            
            ans += (long long int) std::floor(a) % 10;
        }

        std::cout << ans << std::endl;
    }

    return 0;
}