#include<bits/stdc++.h>
#define rep(i,n)for(ll i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	ll a, b, n;
	while (cin >> a >> b >> n) {
		ll cnt = 0;
		rep(i, n) {
			a *= 10;
			cnt += (a / b) % 10;
			a %= b;
		}
		cout << cnt << endl;
	}
	return 0;
}