#include <cstdio>  
  
int main()  
{  
    int a, b, n;  
    while (scanf("%d%d%d", &a, &b, &n) != EOF)  
    {  
        int sum = 0;  
        a %= b;  
  
        for (; n; n--)  
        {  
            a *= 10;  
            sum += a / b;  
            a %= b;  
        }  
  
        printf("%d\n", sum);  
    }  
  
    return 0;  
} 