#Lutece3022. 好像有点奇怪啊

好像有点奇怪啊

Migrated from Lutece 3022 好像有点奇怪啊

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

annb=ab\frac{an}{nb}=\frac{a}{b}

这看起来是个平常的式子,就和每天早上起来都要刷牙一样平常。但在这道题目中,anan 被定义为 aann 的拼接,例如 114114514514 的拼接是 114514114514。同样地,nbnb 也是 nnbb 的拼接。这时,这个式子就有些奇怪了。

现在,你需要求出对于给定的 A,B,NA,B,N,有多少三元组 (a,b,n)(a,b,n) 满足这个奇怪的式子且满足 1a<A,1b<B,1n<N1\leq a<A,1\leq b<B,1\leq n<N

Input

一行包括三个整数 A,B,N(1A,B105;1N109)A,B,N(1\leq A,B\leq 10^5;1\leq N\leq 10^9)

Output

输出一个整数,代表符合条件的三元组数量。

Samples

5 6 10
7
10 10 100
29

Note

第一个样例中符合条件的三元组有 $(1,1,1),(1,4,6),(1,5,9),(2,2,2),(2,5,6),(3,3,3),(4,4,4)$。

Resources

2023 UESTC ICPC Training for Math