#P1725G. Garage
Garage
Description
Pak Chanek plans to build a garage. He wants the garage to consist of a square and a right triangle that are arranged like the following illustration.
Define and as the lengths of two of the sides in the right triangle as shown in the illustration. An integer is suitable if and only if we can construct a garage with assigning positive integer values for the lengths and () so that the area of the square at the bottom is exactly . As a good friend of Pak Chanek, you are asked to help him find the -th smallest suitable number.
The only line contains a single integer ().
An integer that represents the -th smallest suitable number.
Input
The only line contains a single integer ().
Output
An integer that represents the -th smallest suitable number.
Samples
Note
The -rd smallest suitable number is . A square area of can be obtained by assigning and .