1624: [NOIP] 数的计算

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:73 Solved:25

Description

给出正整数 lns="http://www.w3.org/1998/Math/MathML">n,要求按如下方式构造数列:

  1. 只有一个数字 lns="http://www.w3.org/1998/Math/MathML">n 的数列是一个合法的数列。
  2. 在一个合法的数列的末尾加入一个正整数,但是这个正整数不能超过该数列最后一项的一半,可以得到一个新的合法数列。

请你求出,一共有多少个合法的数列。两个合法数列 lns="http://www.w3.org/1998/Math/MathML">a, b 不同当且仅当两数列长度不同或存在一个正整数 lns="http://www.w3.org/1998/Math/MathML">i \leq |a|,使得 lns="http://www.w3.org/1998/Math/MathML">a_i \neq b_i

Input

输入只有一行一个整数,表示 lns="http://www.w3.org/1998/Math/MathML">n

Output

输出一行一个整数,表示合法的数列个数。

Sample Input Copy

6

Sample Output Copy

6

HINT

样例 1 解释

满足条件的数列为:

  • lns="http://www.w3.org/1998/Math/MathML">6
  • lns="http://www.w3.org/1998/Math/MathML">6, 1
  • lns="http://www.w3.org/1998/Math/MathML">6, 2
  • lns="http://www.w3.org/1998/Math/MathML">6, 3
  • lns="http://www.w3.org/1998/Math/MathML">6, 2, 1
  • lns="http://www.w3.org/1998/Math/MathML">6, 3, 1