#include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <map>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()
#define print(s) cout << (s) << endl

vector<int> decimals;

void calculate(int a, int b) {
    decimals.clear();
    a = a % b;
    REP(i,100) {
        decimals.push_back(a * 10 / b);
        a = a * 10 % b;
    }
}

int getNthDecimal(int n) {
    int s = 0;
    REP(i,n) {
        s += decimals[i];
    }
    return s;
}

int main() {
    int a, b, n;
    while(cin >> a >> b >> n) {
        calculate(a, b);
        cout << getNthDecimal(n) << endl;
    }
    return 0;
}