 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 #include<deque>
 #include<functional>
 #include<utility>
 
 using namespace std;

 int main()
 {
   int a,b,num;
   while(cin>>a>>b>>num)
   {
     int r=a%b;
     int sum=0;
     while(num--)
     {
       sum+=((r*10)/b);
       r=(r*10)%b;            
     }            
     cout<<sum<<endl;         
   }
   //while(1);
   return 0;
 }