#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main()
{
	int a,b,n,s;
	double tmp;
	while(scanf("%d %d %d",&a,&b,&n)!=EOF)
	{
		s=0;
		a%=b;
		for(int i=0;i<n;i++)
		{
			a*=10;
			s+=a/b;
			a%=b;
		}
		cout << s << endl;
	}
	return 0;
}