#include <cstdio>
using namespace std;

int main(){
	int a, b, n;
	int res;
	
	while(scanf("%d%d%d", &a, &b, &n) != EOF){
		res = 0;
		
		a = (a % b) * 10;
		for(int i = 0; i < n; i++){
			res += a / b;
			
			a = (a % b) * 10;
		}
		
		printf("%d\n", res);
	}
	
	return 0;
}