Time

12:42:30
23 May 2012
Version for print

The Segments

   Cut a segment with length L on the most quantity of parts the lengths of which are natural numbers, that from them it is not impossible to make a single triangle.


Specifications

   Input

   The length of the segment L. 4 <= L <= 2000000000.

   Output

   The required number of parts.


Problem information

Time Limit: 1 seconds
Memory Limit: 64 MB
Balls for the passed test: 10
Complexity: 24% 264/348

Example

Example input

6

Example output

3


← The Fuel Problems The Parquet of the Triangles →