#include<cstdio>
int main(){
    int a,b,n;
    while(scanf("%d%d%d",&a,&b,&n)!=-1){
        int sum=0;
        a%=b;
        for(int i=1;i<=n;i++){
            a*=10;
            sum+=a/b;
            a%=b;
        }
        printf("%d\n",sum);
    }
}