#include<cstdio>
#include<cmath>
#include<string>
#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
    int a,b,n;

    while(scanf("%d%d%d",&a,&b,&n)!=EOF){
        double x= (double) a /(double) b;
        x-=floor(x);
        int ans=0;
        for(int i=0;i<n;i++){
            x*=10;
            ans+=(int)floor(x);
            x-=floor(x);

        }


        printf("%d\n",ans);

    }

    return 0;
}