#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<cmath>
 
using namespace std;
 
int main()
{
  float a, b;
  int n, c;
  vector<int> nums;
  cin >> a >> b >> n;
  float j = a / b;
  for(int i = 0; i < n; i++)
  {
    j *= 10;
    c = floor(j);
    //cout << c % 10 << endl;
    nums.push_back(c % 10);
   }
  int ans = 0;
  for(int i = 0; i < n; i++)
  {
    //cout << nums[i] << endl;
    ans += nums[i];
  }
  cout << ans << endl;
}