#include<cstdio>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
#include <vector>
#include <map>
#include<cstdlib>

using namespace std;




void Solution()
{
    int a, b, n;
    
    while(cin>>a>>b>>n)
    {
        int sum = 0;
        
        //algorithm
        for (int i = 0; i < n; i++)
        {
            a %= b;
            a *= 10; // for devided by b
            sum += a / b;  //only get the decimal place
        }
        
        cout<<sum<<endl;
    }
}

int main()
{
    Solution();
    return 0;
}