#include <algorithm>
#include <iostream>
#include <string>

int main(void) {
	int a;
	int b;
	int n;
	while (std::cin >> a >> b >> n) {
		int sum = 0;
		std::string fra_str = std::to_string((double)a/b);
		// find the position of decimal point
		auto dec_point_pos = std::find_if(fra_str.begin(),fra_str.end(),[](char c){return c == '.';});
		auto stop_pos = fra_str.end() - dec_point_pos > n ? dec_point_pos + n + 1 : fra_str.end();
		for (auto itr = dec_point_pos + 1;itr != stop_pos;++itr) {
			sum += (int)(*itr - '0');
		}
		std::cout << sum << std::endl;
	}
	return 0;
}