#include <iostream>
#include <stdio.h>
using namespace std;

int main() {
	int a,b,n,r,s;
	while(cin >> a >> b >> n) {
    r=a % b; s=0;
	for (n;n>0;n--) { r*=10; s+=r/b; r=r % b;}
	cout << s << endl;
	}
	return 0;
}