Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

EIUCUBES - Building Pyramid


Sau 3 năm đại học, bạn Beo vẫn FA. Vì vậy Beo quyết tâm tìm bạn gái trước khi ra trường. Sau một thời gian tìm hiểu, Beo đã nhắm được một bạn nữ sinh điều dưỡng. Vì đã học môn kỹ năng giao tiếp nên Beo biết first impression rất là quan trọng. Vì vậy, Beo muốn có một màn trình diễn thật ấn tượng trong lần gặp mặt đầu tiên với bạn nữ xinh đẹp ấy. Cân nhắc một lúc Beo quyết định chọn biểu diễn kỹ thuật… xếp gạch. Beo muốn xếp một hình tam giác theo một quy tắc sau:
Tầng đầu tiên có 1 viên gạch.
Tầng thứ 2 có 1 + 2 = 3 viên gạch.
Tầng thứ 3 có 1 + 2 + 3 = 6 viên gạch.
….
Tầng thứ n có 1 + 2 + … + n viên gạch.
Bạn Beo nghĩ rẳng xếp càng nhiều tầng (càng lâu) thì bạn nữ càng thích mà lượng gạch ở ktx chỉ có n viên, bạn Beo muốn biết với số gạch đó thì mình có thể xếp tối đa bao nhiêu tầng?

After 3 years of university, Beo is still FA. So Beo decide to find a girlfriend before graduation. Beo knew that the first impression was very important. Therefore, Beo wants to have an impressive performance in the first meeting with a beautiful girl. Because of upcoming chirstmas, he want to build a pyramid to replace the Christmas tree:

  • The top of the pyramid contains one brick.
  • 2nd layer has 1 + 2 = 3 bricks.
  • 3rd layer has  1 + 2 + 3 = 6 bricksh.
  • ….
  • nth layer has 1 + 2 + … + n bricks.

Given the number of bricks Beo has, calculate the maximum number of layers Beo can build.

 

Input

The first line contains the number n (1 <= n <= 10,000) which is the number of bricks

Output

The maximum number of layers that can be build

Example


Input:

1
Output:

1


Input:

25

Output:

4


Added by:Ha Minh Ngoc
Date:2014-12-22
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET
Resource:Sưu tầm
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.