#include <iostream>
#include <cmath>

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

        a %= b;

        for (long long int i = 0; i < n; ++i) {
            a *= 10.; 
            ans += (double) a / b;
            a %= b;
        }

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

    return 0;
}