#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

////////////////*My library*////////////////////////
#define rep_to(a,i,n) for(i=a;i<n;i++)
#define rep(i,n) for(i=0;i<n;i++)
#define rep_r(i,n) for(i=n-1;i>=0;i--)
#define debug_i(x) printf("x:%d\n",x)
#define debug_f(x) printf("x:%f\n",x)
#define debug_s(str) printf("str:%s\n",str)
#define debug_c(c) printf("c:%c\n",c)
#define s_i1(x) scanf("%d",&x)
#define s_i2(x,y) scanf("%d %d",&x,&y)
#define s_i3(x,y,z) scanf("%d %d %d",&x,&y,&z)
////////////////////////////////////////////////////
////////////////////////
/*prime()*/
/*primecount()*/
/*sort()*/
///////////////////////

int main()
{
	int i,j,k;
	int a,b,n,dec=10,set;
	int num[100000]={},sum=0;

	while(s_i3(a,b,n)!=EOF)
	{
		dec=10;
		sum=0;
		set=a/b;
		rep(i,n)
		{
			if(set!=0)
			{
				num[i]=((double)a/b-set)*dec;
				num[i]%=10;
				dec*=10;
			}
			else 
			{
				num[i]=a*dec/b;
				num[i]%=10;
				dec*=10;
			}
		}
		rep(i,n)sum+=num[i];
		printf("%d\n",sum);
	}
	return 0;
}