#include<iostream>
using namespace std;

int main()
{
    int f[10];
    double a,b,sho;
    int n;
    while(cin >> a >> b >> n)
    {
        sho = a/b;
        f[0] = (int)(a/b);
        for(int i=1;i<10;i++)
        {
            sho -= f[i-1];
            sho *= 10;
            f[i] = int(sho);
        }
        int ans=0;

        for(int i=1;i<=n;i++)
        {
            ans+= f[i];
        }
        cout << ans << endl;
    }

    return 0;
}