Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Mushrur Injured in Singara Blast

By Tareq_Abrar · Limits 1s, 512 MB

Mashrur Hossain, a programmer, came to Bot-toli from GEC yesterday to attend an event organized by the Collegiate School. The ‘Singara’s (a Bangladeshi food) were fried for lunch at that time. Mashrur Hossain suddenly became ill when there was a sudden explosion of ‘Singara’. He has to bear with the effects of explosion and radioactiveness throughout his life. However, the effects of radioactivity depend on how many ‘Singara’s he ate before he was ill. For example, if he eats a ‘Singara’, then the level of radioactivity is 1. For 2 ‘Singara’s, radioactivity level is 1 + 2 = 3, radioactive level is 1 + 2 + 3 = 6 for 3 ‘Singara’s, Similarly, the total radioactive level of 5 ‘Singara’s is 1 + 2 + 3 +. 4 + 5 = 15. If you are told how much the radioactivity level is, find out how many ‘Singara’s Mashrur ate before he became ill.

Input

The input contains only one integer $N$ ($ 1 \le N \le 10^18 $), which denotes the radioactive level.

Output

Output will contain only one integer, which denotes the number of ‘Singara’s Mashrur ate. The output will be integers for all inputs.

Sample

InputOutput
6
3

1+2+3=6


Discussion

Statistics


74% Solution Ratio

BrehamPieEarliest, 3w ago

BrehamPieFastest, 0.0s

BrehamPieLightest, 0 B

maddogShortest, 45B

Submit

Login to submit

Related Contests