cho.sh
Notes
Loading...

Sum of Distinct Numbers

Time limit

2s

Memory limit

128 MB

Problem

Choose N distinct positive integers whose sum is S. Given S, find the maximum possible value of N.

Input

The first line contains a positive integer S.

  • 1 <= S <= 4,294,967,295

Output

Print the maximum possible value of N.