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

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