#include <iostream>

int main()
{
    int a, b, n;
    while (std::cin >> a >> b >> n) {
        int sum = 0;
        while (n--) {
            a *= 10;
            sum += (a / b) % 10;
            a %= b;
        }

        std::cout << sum << std::endl;
    }

    return 0;
}