What is the minimum number of matches required to construct squares on a plane, where each square has sides of length equal to one match? Matches cannot be broken or placed on top of each other. The vertices of the squares are the points where the ends of the matches meet, and the sides of the squares are formed by the matches themselves.
Write a program that, given the number of squares , determines the minimum number of matches needed to construct them.
The input consists of a single integer (1 \leq n \leq 10^9).
Output a single integer — the minimum number of matches required to construct squares.
Example 1