#include <cstdio>
#include<iostream>
 
using namespace std;
  
int main(void){
 
    long long a,b,n,sum;
    long double dec;
 
    while(cin>>a>>b>>n){
       dec=(long double)a/b;
	   sum=0;
	   while(n){
		   dec*=10;
		   sum+=(int)dec%10;
		   n--;
	   }
	   cout<<sum<<endl;
    }
 
    return 0;
}