#include<cstdio>
#include<cmath>
using namespace std;
int main(){
    double a,b;
    int n;
    double r=0;
    while(scanf("%lf%lf%d",&a,&b,&n)!=EOF){
        double x = a / b;

        double q = floor(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;
}