Magic constant#5064

Magic constant

1 second
128 megabytes
Very easy

We call the magic constant for number , if 1 + 2 + 3 + \ldots + (k - 1) + k = n. Your task is to find the magic constant for a given number.

Input

One number (1 \leq n \leq 10^{18}).

Output

Print the magic constant for number , if it exists and otherwise.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading