#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
using namespace std;

int main()
{
    string str;
    stringstream ss;
    double a, b, buff;
    int n, ans, dot;
    while(cin >> a >> b >> n)
    {
        ans = 0;
        buff = a / b;
        ss.clear();
        ss.str("");
        ss << buff;
        str = ss.str();
        str.append(n,'0');
        dot = str.find(".");
        for(int c = 1; c <= n; c++)
        {
            ans += (int) str[c + dot] - '0';
        }
        cout << ans << endl;
    }
    return EXIT_SUCCESS;
    
}