#ABC206B. [ABC206B] Savings

    ID: 1584 Type: RemoteJudge 2000ms 1024MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>基础语法输入输出基础算法二分二分答案

[ABC206B] Savings

提示:该题测试数据补录中,暂不支持评测提交。

No testdata at current.

No submission language available for this problem.

Score : 200200 points

Problem Statement

AtCoDeer has an empty piggy bank. On the morning of the ii-th day, he will put ii yen (Japanese currency) in it: 11 yen on the morning of the 11-st day, 22 yen on the morning of the 22-nd day, and so on. Each night, he will check the amount of money in it. On which day will he find out that his piggy bank has NN yen or more for the first time?

Constraints

  • 1≤N≤1091 \le N \le 10^9
  • NN is an integer.

Input

Input is given from Standard Input in the following format:

NN

Output

Print an integer xx such that AtCoDeer will find out that his piggy bank has NN yen or more for the first time on the xx-th day.

12
5
  • On the 11-st day, the piggy bank gets 11 yen in the morning and has 11 yen at night.
  • On the 22-st day, the piggy bank gets 22 yen in the morning and has 33 yen at night.
  • On the 33-rd day, the piggy bank gets 33 yen in the morning and has 66 yen at night.
  • On the 44-th day, the piggy bank gets 44 yen in the morning and has 1010 yen at night.
  • On the 55-th day, the piggy bank gets 55 yen in the morning and has 1515 yen at night.

Thus, on the 55-th night, AtCoDeer will find out that his piggy bank has 1212 yen or more for the first time.

100128
447