#include <iostream>
using namespace std;

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