#include <iostream>

using namespace std;

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