#include <iostream>
using namespace std;

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