#define _USE_MATH_DEFINES
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<climits>
#include<cmath>
#include<cstdio>
#include<deque>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

int main() {
	int a, b, n;
	cin >> a >> b >> n;
	string s = to_string((double)a / b);

	int S = 0, h = s.find(".") + 1;
	for (int i = h; i <= n + h; i++) {
		S += s[i]-'0';
	}
	cout << S << endl;
	return 0;
}