Aztec Pyramid
문제
Aztec emperor Cuitláhuac is going to build a pyramid in his honor. This pyramid should be taller than previous ones.
The Aztec pyramid is build out of stone blocks. Each block is 1×1×1-hunab cube. Cuitláhuac places first block on the ground during the foundation ceremony. Each of the following blocks must share a face with at least one of the previous blocks.
[이미지 1]
The block is stable if it stands on the ground, or it stands on another block, that has a block or the ground next to each face. To stand the test of time the pyramid must be stable i.e. each block of it must be stable.
[이미지 2]
Cuitláhuac asks you to determine the height of the tallest stable pyramid that can be built out of available blocks.
입력
The only line of the input file contains a single integer number n — the number of available blocks, including the first one (1 ≤ n ≤ 109).
출력
Output the height of the tallest stable pyramid that may be built out of n blocks. The height must be output in hunabs.
예제
예제 1
6
2
예제 2
5
1
예제 3
20
3