#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define FOR(i,a,b) for(int i=(a);i<(int)(b);i++)
#define rep(i,n) FOR(i,0,n)
#define ALL(x) (x).begin(), (x).end()
#define SYAMU(a) memset(a,0,sizeof(a))
#define pb push_back

int a, b, n;

int f(int m) {
    int div = 1;
    double t = 1.0 * a / b;
    if(m == 1) return (int)(t*10); 
    t *= 10;

    rep(i,m-1) {
        t += 10;
        div += 10;
    }

    return (int)(t) % div;
}

int main() {
    while(~scanf("%d%d%d",&a,&b,&n)) {
        int s = 0;
        FOR(i,1,n) s += f(i);
        cout << s << endl;
    }

    return 0;
}