#include<iostream>
#include<string>
#include<algorithm>
#include<list>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<numeric>
#include<vector>
#include<cstdio>
#include<climits>
#include<cfloat>
#include<cstring>
#define foreach(t,p,tit) for(t::iterator tit=p.begin();tit!=p.end();++tit)
#define rforeach(t,p) for(t::reverse_iterator it=p.rbegin();it!=p.rend();++it)
#define all(p) p.begin(),p.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long
using namespace std;
ll f10(int n)
{
    return (n==1)? 10: 10*f10(n-1);
}


int main()
{
    long long a,b,n;
    while(cin>>a>>b>>n)
    {
        ll ans = 0;
        vector<ll> f;
        vector<ll> g;
        f.push_back( a/b);
        g.push_back(a/b);
        for(int i=1;i<=n;i++)
        {
            g.push_back(a*f10(i) /b);
            f.push_back(g[i]-g[i-1]*10);
            ans += f[i];
        }
        

        cout << ans << endl;
    }

    return 0;
}