Magical constant 2#5068

Magical constant 2

1 second
64 megabytes
Medium

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.

Input

The input consists of a single line containing the number , 1 \leq N \leq 10^{1000}.

Output

Print the magic constant for if it exists; otherwise, print .

Examples

Example 1

Loading
Loading