#include <iostream>
using namespace std;

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