#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
    int a,b,n,ans;
    while(cin >> a >> b >> n){
       ans = 0;
       long double t = static_cast<long double>(a)/b;
       for(int i = 0; i < n; ++i){
           t *= 10;
           ans += static_cast<int>(t) % 10;
       }
       cout << ans << endl;
    }

}