#include <iostream>
using namespace std;

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