A number is called a magic constant for the number if the sum 1 + 2 + 3 + \ldots + (k - 1) + k = N. Your task is to determine the magic constant for the given number.
The input consists of a single line containing the number , 1 \leq N \leq 10^{1000}.
Print the magic constant for if it exists; otherwise, print .
Example 1