Divide

์•„์ง ์ œ์ถœ์ด ์—†์Šต๋‹ˆ๋‹ค์‹œ๊ฐ„ ์ œํ•œ1.8์ดˆ๋ฉ”๋ชจ๋ฆฌ ์ œํ•œ1024 MB

๋ฌธ์ œ

Who doesnโ€™t love math ๐Ÿ™‚

Let pp, qq and nn be natural numbers. We will say that a pair of natural numbers (a,b)(a, b) is interesting when:

  1. 1โ‰คaโ‰คp1 โ‰ค a โ‰ค p
  2. 1โ‰คbโ‰คq1 โ‰ค b โ‰ค q
  3. c=aร—ba+bc = \frac{a \times b}{a + b} is a natural number, and 1โ‰คcโ‰คn1 โ‰ค c โ‰ค n, that is the product aร—ba \times b is divisible without remainder by the sum a+ba + b, and their quotient is less than or equal to nn.

The goal of this task is simple - find the number of interesting pairs!

Write a program divide, that given the three numbers pp, qq and nn, computes the number of interesting pairs.

์ž…๋ ฅ

The only line of the standard input contains the numbers pp, qq and nn.

์ถœ๋ ฅ

On the single line of the standard output, print the number of interesting pairs. It is guaranteed that the answer less than 101810^{18}.

์ œํ•œ

  • 1โ‰คp,q,nโ‰ค10101 โ‰ค p, q, n โ‰ค 10^{10}