648. Coin Staircase
0
Easy
Aman is playing a game with coins. He has a total of **n** coins.
Aman wants to construct a staircase using these coins. The staircase is made up of multiple rows, where each row contains a specific number of coins. The number of coins in the `ith` row is equal to `i`. However, the last row of the staircase may not be completely filled.
Your task is to determine the number of complete rows in the staircase that Aman will be able to build.
Input Format
A single line containing the total number of coins.
Output Format
Print the number of complete rows in the staircase.
Example
Input
9
Output
3
Constraints
1 <= N <= 231-1
Loading...
View Submissions
Console