#include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

int main() {
    int a,b,n;
    
    while(cin>>a>>b>>n){
        ll x=1;
        rep(i,n){
            x*=10;
        }
        long double ans=(long double)a/b;
        
        ll xx=ans;
        
        ans-=xx;
        
        stringstream ss;
        ss<<(ll)(ans*x);
        
        string res=ss.str();
        int sum=0;
        int len=res.size();
        for(int i=len-1;i>len-n-1;i--){
            sum+=res[i]-'0';
        }
        cout<<sum<<endl;
    }
    
    return 0;
}