#include<iostream>
using namespace std;
int main()
{
	int a,b,n;
	while(cin>>a>>b>>n)
	{
		double res=a*1.0/b;
		for(int i = 1; i <= n; ++i)
		{
			res*=10.0;
		}
		int ans=0;
		for(int i = 1; i < n+1; ++i)
		{
			ans+=(int)res%10;
			res/=10;
		}
		cout<<ans<<endl;
	}
  return 0;
}