#include<cstdio>
#include<cmath>
using namespace std;
int main(){
    int a,b,n;
    double r=0;

    while(scanf("%d%d%d",&a,&b,&n)!=EOF){
        double x= (double) a /(double) b;

        double q = floor(x);

        x = x - q;

        int ans = 0;

        for(int i = 0;i < n ; i++){

            r = x * 10;
            r = floor(r);

            ans +=  (int)r;

            x *= 10;

            x -= r;
        }

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

    }

    return 0;
}