Codeforces Round 280 (Div. 2)
翻译中…
Vanya got $*n*$ cubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of the pyramid must consist of $1$ cube, the second level must consist of $1 + 2 = 3$ cubes, the third level must have $1 + 2 + 3 = 6$ cubes, and so on. Thus, the $*i*$-th level of the pyramid must have $1 + 2 + ... + (*i* - 1) + *i*$ cubes.
翻译中…
Vanya wants to know what is the maximum height of the pyramid that he can make using the given cubes.
翻译中…
Input
翻译中…
The first line contains integer $*n*$ ($1 ≤ *n* ≤ 10^{4}$) — the number of cubes given to Vanya.
翻译中…
Output
翻译中…
Print the maximum possible height of the pyramid in the single line.
翻译中…
Note
翻译中…
Illustration to the second sample:
翻译中…

翻译中…
样例
Input #1
1
Output #1
1
InputCopy
OutputCopy
Input #2
25
Output #2
4
InputCopy
OutputCopy
题目信息
标签
模拟
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。