#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>

using namespace std;

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