#include <bits/stdc++.h>

using namespace std;

int main() {
    int a, b, n;
    while (scanf("%d %d %d", &a, &b, &n) != EOF) {
        if (a == b) {
            cout << 0 << endl;
            continue;
        }
        if (a > b) a %= b;

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

        cout << ans << endl;
    }

    return 0;
}
