#include <iostream>
#include <sstream>
using namespace std;

int main( void )
{
    string line;
    long long a, b, n;
    while ( !cin.eof() ) {
        line = "";
        getline( cin, line );
        istringstream is( line );
        is >> a >> b >> n;
        if ( a % b == 0 ) {
            cout << 0 << endl;
            continue;
        }
        a %= b;
        
        long long sum = 0;
        for ( long long i = 0; i < n; i++ ) {
            a *= 10;
            sum += a / b;
            a %= b;
        }

        cout << sum << endl;
    }
    return 0;
}