#include <iostream>
using namespace std;


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