#include <iostream>
#include <cmath>
using namespace std;

int main(){
	int a, b, n,cnt;
	while (cin >> a >> b >> n){
		cnt = 0;
		for (int i = 1; i <= n; i++){
			cnt += (int)(floor((double)a / (double)b * pow(10.0, (double)i))) % 10;
		}
		cout << cnt << endl;
	}
}