eolymp
bolt
Try our new interface for solving problems
Problems

Perfect squares

Perfect squares

In order to search for patterns, it is sometimes useful to generate a long sequence according to certain rules. It is known, for example, that the sequence 0, 0 + 1, 0 + 1 + 3, 0 + 1 + 3 + 5, ... , 0 + 1 + 3 + .. + (2n - 1), ... , composed of the sums of several first odd positive integers, consists of squares of integers: 0, 1, 4, 9, ..., n2, ... .

We generalize this sequence as follows: instead of the initial value, we will use not a zero, but a number k. We get the sequence: k, k + 1, k + 1 + 3, k + 1 + 3 + 5, ... , k + 1 + 3 + ... + (2n - 1), ... . In contrast to the case of k = 0, not only perfect squares can occur in this sequence. It is necessary to find the minimum non-negative integer number whose square is found in this sequence.

Write a program that, by the given integer k, determines which square of a minimal non-negative integer is found in the described sequence, or finds out that it does not contain complete squares at all.

Input

One integer k (-1012k1012) - the starting number in the sequence.

Output

Print the minimum nonnegative integer, which square is found in the described sequence. If the sequence does not contain squares of integers, print "none".

Explanataion

In the first example, each number in the sequence is a perfect square. The minimum of them is 0, 02 = 0.

In the second example, the sequence starts like this: -5, -4, -1, 4, 11, 20, ... . The minimum non-negative integer whose square is found in the sequence is 2, 22 = 4.

In the third example, the sequence starts like this: 2, 3, 6, 11, 18, ... . It does not have perfect squares.

Time limit 1 second
Memory limit 128 MiB
Input example #1
0
Output example #1
0
Input example #2
-5
Output example #2
2
Input example #3
2
Output example #3
none
Source 2018 All Russia school informatics olympiad, Regional stage, Day 1, Moscow, January 26, 2019, Problem B