#include <iostream>

using namespace std;

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

    return 0;
}