#include <iostream>

using namespace std;

int main()
{
    int a, b;
    int n;

    while (cin >> a >> b >> n) {
        int s = 0;

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

    return 0;
}