#include <iostream>
#include <string>

using namespace std;

int main()
{
    int a, b, n;
    while (cin >> a >> b >> n) {
        int div_int = a / b;
        double div = static_cast<double>(a) / b;
        div -= div_int;

        char str_ch[20];
        sprintf(str_ch, "%.9f", div);
        string str = str_ch;
        str = str.substr(2);

        int sum = 0;
        for (auto i = 0; i < n; i++) {
            sum += str.at(i) - '0';
        }

        cout << sum << endl;
    }

    return 0;
}