#include <iostream>
using namespace std;

#define REP(i, n)       REPEAT(i, 0, n)
#define REPEAT(i, k, n) for (int i = (k); i < (n); ++i)

int main(){
    int a, b, n;
    while(cin >> a >> b >> n){
        int t = 0;
        REP(i,n){
            a = (a % b) * 10;
            t += a / b;
        }
        cout << t << endl;
    }
    return 0;
}