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

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