#include<cstdio>
using namespace std;
int main(){

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

        int ans = 0;


        for(int i = 0; i < n; i++){
            a = (a % b)*10;
            ans += a / b;
        }

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

    }

    return 0;
}