#include<iostream>
#include<string.h>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;

int main()
{
  int n;
  double a,b;
  int i;

  while(scanf("%lf %lf %d",&a,&b,&n)!=EOF){
    int sum=0;
    a=a/b;
    for(i=1;i<n+1;i++){
      a*=10;
      int num=a;
      sum+=num%10;
    }
    cout<<sum<<endl;
  }
}