#include <string>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <utility>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <iterator>
#include <sstream>

using namespace std;

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