#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>


using namespace std;

int main(){

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

    }
}