#include <iostream>
#include <cmath>
using namespace std;

int main() {
    int a, b, n;
    while (cin >> a >> b >> n) {
        double abyb = (double) a / b;
        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += (int) (abyb * pow(10, i + 1)) % 10;
        }
        cout << sum << endl;
    }
}