#include <iostream>
using namespace std;

int main(){
    int a, b, n;

    while(cin >> a >> b >> n){
        int sum = 0;
        int tmp = a;
        for(int i=1; i<=n; i++){
            tmp *= 10;
            sum += (tmp/b) % 10;
            tmp %= b;
        }
        cout << sum << endl;
    }
    return 0;
}