#include <iostream>

using namespace std;

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