#include <iostream>
 
using namespace std;

void solve()
{
	int a,b,n;
 
	while(cin >> a >>b >> n)
	{
		int remain = a % b;
		int ret = 0;
		for(int i=0;i<n;i++)
		{
			remain *= 10;
			ret += remain / b;
			remain %=  b;
		}
	cout << ret << endl;
	}
}

int main(void)
{
	solve();
	return(0);
}