Sequence#2685

Sequence

0.1 seconds
64 megabytes
Very easy

Find a sequence of consecutive natural numbers (N = 2k + 1) such that the sum of the squares of the first k + 1 numbers is equal to the sum of the squares of the last numbers. For instance, when N = 5, the sequence is , , , , , because 10^2 + 11^2 + 12^2 = 13^2 + 14^2. The sequence is considered found when its first number is determined.

Input

You are given a natural number (3 \leq N < 1000).

Output

Print only the first number of the sequence, or "–1" if no such sequence exists. If there are multiple solutions, print the smallest possible one.

Examples

Example 1

Loading
Loading