#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;
		tmp = ((double)a)/((double)b);
		for(int i=1;i<=n;i++)
		{
			s+=(int)(tmp*pow(10,i))%10;
		}
		cout << s << endl;
	}
	return 0;
}