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