
#include <iostream>

using namespace std;

int main() {
    int a, b, n;
    while(cin >> a >> b >> n) {
        int sum = 0;
        double d = (double)a / b;
        d = d - (int)d;
        for(int i = 0; i < n; ++i) {
            d *= 10;
            sum += (int)d;
            d = d - (int)d;
        }
        cout << sum << endl;
    }
    return 0;
}