#include <iostream>
using namespace std;

int main()
{
	int a,b;
	int n;
	while(cin >> a >> b >> n){
		int sum=0;
		a = a%b;
		for(int i=1;i<=n;i++){
			if(a==0)
				break;
			if(a/b == 0)
				a = a*10;
			else
				a = (a%b)*10;
			sum += a/b;
		}
		cout << sum << endl;
	}
	return 0;
}