#include <iostream>

using namespace std;

int main(){
   int a,b,n,sum;
   while(cin >> a >> b >> n){
      sum = 0;
      for(int i=0; i<n; i++){
	 a *= 10;
	 sum += (a/b)%10;
	 a = a%b;
      }
      cout << sum << endl;
   }
   return 0;
}