Resting at Petya's grandmother's country house, Petya and Vasya decided to build a secret headquarters for their espionage organization. To accommodate all their spy equipment, they need a room with an area of exactly square meters. The headquarters must be built from materials found in their grandmother's shed: wooden planks, each exactly one meter long. Remembering their last geometry lesson, Vasya suggests to make the headquarters in the shape of a right triangle. This makes it easy to calculate the area and check if it matches the requirement.
However, there is no saw available, so the planks cannot be cut. Therefore, Petya and Vasya have to build the headquarters in the form of a right triangle with all sides expressed as integer numbers of meters. They want to know how many such triangles exist. Triangles with the same side lengths, but in a different order, are considered the same.
The input contains a single integer (1 \le s \le 10000) — the required area of the headquarters.
Print a single integer — the number of possible headquarters plans with an area of square meters.
Example 1
Example 2