MRECTCNT - Rectangles Counting

Let R be a rectangle with integer side lengths. The rectangle is divided into unit squares. Considering one of the diagonals, we denote by f(R) the number of squares which have a common interior point with it. For example, if the side lengths of R are 2 and 4 then f(R)=4. Write a program to find out the number of all different rectangles R for which f(R) = N. Two rectangles with sides a x b and b x a are not different.

Input

In a single line of the standard input the integer N (0 < N < 10^6) is given.

Output

The only line of the standard output should contain an integer – the calculated number of rectangle.

Sample Input

4

Sample Output

4
Problem for kid - Please, think like kid.

Added by:psetter
Date:2009-02-18
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:BOI For Kid 08

hide comments
2011-05-17 16:48:01 Luke Pebody
I ran my code on ideone and it finishes in a fraction of a second (and I calculate the values for all N, so the speed does not depend on the input). Are the spoj computers slower than the ideone ones?
2011-03-26 02:09:42 biQar
i don't know how the kids solve this problem !!! this problem is really not for kids !!! :(
2009-12-01 15:50:28 Ehor Nechiporenko
I don't think, that kids know factorisation
2009-07-30 18:33:42 Drew Saltarelli
what a lousy test case...
2009-06-19 01:21:32 ~ adieus ~
Please,think like kid --- what !!!!!!!
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.