Bored out of his mind from being stranded on an island, Tusk has taken to writing down sequences of numbers in the sand. Today, he decided to write down a triangle of numbers, with each row ~r~ containing ~r~ numbers. When read from top to bottom, left to right, the triangle is made up of consecutive natural numbers starting from ~1~.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...
Being curious and having nothing better to do, Tusk wonders what the sum of all the numbers on the row that contains the number ~N~ is.
Unfortunately, his beach is too small for him to write down such a massive triangle!
Subtask 1 [40%]
For ~40\%~ of the points, it will hold that ~N \le 10^3~.
Subtask 2 [60%]
For the remaining ~60\%~ of the points, it will hold that ~N \le 10^9~.
A single integer, ~N~.
The sum of all the numbers on the row of the triangle containing ~N~.
Considering the example triangle, ~5~ is contained in row ~3~, which contains the numbers ~4+5+6 = 15~.