// 2011/04/06 Tazoe

#include <iostream>
using namespace std;

int main()
{
	while(true){
		int a, b, n;
		cin >> a;
		if(cin.eof())
			break;
		cin >> b >> n;

		int s = 0;
		a = a%b;
		for(int i=1; i<=n; i++){
			a *= 10;
			s += a/b;
			a = a%b;
		}

		cout << s << endl;
	}

	return 0;
}