#B3834. Counting Integer Rectangles with a Given Area

    ID: 11491 Type: Default 1000ms 256MiB

Counting Integer Rectangles with a Given Area

Counting Integer Rectangles with a Given Area

Little Ming has just learned how to compute the area of a rectangle. He discovered that if both the length (L) and width (W) of a rectangle are integers, then the area (A = L \times W) is an integer as well. Now, given an integer area (A), your task is to determine the number of distinct rectangles (with integer sides) that can have an area of (A), under the condition that (L \geq W). Note that squares (where (L = W)) are considered as a valid type of rectangle. Two rectangles are considered the same if their corresponding sides are equal.

inputFormat

The input consists of a single integer (A) ((1 \leq A \leq 10^{12})) representing the area of the rectangle.

outputFormat

Output a single integer, which is the number of distinct rectangles with integer side lengths that have an area of (A) and satisfy (L \geq W).

sample

1
1