The Perfect Gift
It is the season of giving and
is making a gift for his idol, .likes most natural numbers (\(1, 2, 3, 4, ..\)), but not all natural numbers. Specifically, doesn't like square numbers. So, decided to write a list of all the natural numbers that likes (all natural numbers except for square numbers).
Unfortunately,
is practicing for the CCC, so he asks you to help him out a bit. wants to know what the \(Q\)-th element of his list is.Constraints
\(1 \le Q \le 10^9\)
Subtask 1 [30%]
\(1 \le Q \le 10^5\)
Input Specification
The first and only line contains an integer \(Q\), which is the index of the element you want to find.
Output Specification
Output the \(Q\)-th element of his list.
Sample Input
5
Sample Output
7
Explanation
's list starts with \([2, 3, 5, 6, 7]\). Therefore, the fifth element of his list is \(7\).
Comments