1638:搭积木

文件提交:无需freopen 内存限制:128 MB 时间限制:1.000 S
评测方式:普通裁判 命题人:
提交:2 解决:2

题目描述

小爱用积木搭起一座金字塔。为了结构稳定,金字塔的每一层要比上一层多一块积木。规则如下:

  • 第 lns="http://www.w3.org/1998/Math/MathML">1 层需要放 lns="http://www.w3.org/1998/Math/MathML">1 块积木
  • 第 lns="http://www.w3.org/1998/Math/MathML">2 层需要放 lns="http://www.w3.org/1998/Math/MathML">2 块积木
  • 第 lns="http://www.w3.org/1998/Math/MathML">3 层需要放 lns="http://www.w3.org/1998/Math/MathML">3 块积木
  • 第 lns="http://www.w3.org/1998/Math/MathML"> 层需要放 lns="http://www.w3.org/1998/Math/MathML"> 块积木

给定积木的数量 lns="http://www.w3.org/1998/Math/MathML">,请问最高可以搭出多少层的金字塔?


输入

单个整数表示 n (1<=n<=109)

输出

单个整数表示金字塔的最高高度。

样例输入-1 复制

12

样例输出-1 复制

4