#include <iostream>
#include <cstdio>
#include <vector>
#include <bitset>

using namespace std;

#define MAX 1000000

int main()
{
  int a, b, n;
  while (scanf("%d %d %d ", &a, &b, &n) == 3) {
    int sum = 0;
    
    for (int i = 0; i <= n; i++) {
      if (i > 0) sum += a / b;
      a = (a % b) * 10;
    }
    printf("%d\n", sum);
  }
  return 0;
}