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.
You are given a natural number (3 \leq N < 1000).
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.
Example 1