#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<cmath>

using namespace std;

int main()
{
	int a, b;
	int ans;
	long long n, c;

	while(cin >> a >> b >> n)
	{
		ans = 0;
		a %= b; 
		for(int i = 0; i < n; i++)
		{
			a *= 10;
			ans += a/b;
			a %= b;
		}

		cout << ans << endl;
	}
}