#include<bits/stdc++.h> using namespace std; int main(){ int a,b,n,x; cin>>a>>b>>n; x=int(1.0*a/b*pow(10,n)); cout<<x%10; return 0; }