cho.sh
Notes
Loading...

Decimal Digit

Time limit

2s

Memory limit

128 MB

Problem

Given a dividend (numerator) A and a divisor (denominator) B, find the N-th digit after the decimal point in A / B. For instance, if A = 3, B = 4, and N = 1, then A / B = 0.75, so the answer is 7.

Input

The first line contains three integers A, B, and N separated by spaces. The values satisfy 1 <= A, B <= 100,000 and 1 <= N <= 1,000,000.

Output

Print the N-th digit after the decimal point in A / B.