#include<stdio.h>
#include<stdlib.h>
int main()
{
	int a,b,n,s;
	div_t d;
	while(scanf("%d%d%d",&a,&b,&n)==3)
	{
		a %= b;
		s = 0;
		while(n--)
		{
			d = div(a*10,b);
			s += d.quot;
			a = d.rem;
		}
		printf("%d\n",s);
	}
	return 0;
}