#include <stdio.h>
int main(){
    int a,b,n,ans;
    while(scanf("%d%d%d",&a,&b,&n)!=EOF){
        ans=0;
        a%=b;
        a*=10;
    for(int i=0;i<n;i++){
        ans+=a/b;
        a%=b;
        a*=10;
    }
        printf("%d\n",ans);}
}