跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1559. Array

    ID: 1565 传统题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 6 上传者: 标签>组合数学数学提高难度共享题库Codeforces英文题面题目来源题面语言

Array

题目描述

C. Array
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Chris the Rabbit has been interested in arrays ever since he was a child. At the moment he is researching arrays with the length of n, containing only integers from 1 to n. He is not good at math, that's why some simple things drive him crazy. For example, yesterday he grew keen on counting how many different beautiful arrays there are. Chris thinks that an array is beautiful if it meets one of the two conditions:

  • each elements, starting from the second one, is no more than the preceding one
  • each element, starting from the second one, is no less than the preceding one

Having got absolutely mad at himself and at math, Chris came to Stewie and Brian to ask them for help. However, they only laughed at him and said that the answer is too simple and not interesting. Help Chris the Rabbit to find the answer at last.

Input

The single line contains an integer n which is the size of the array (1≤n≤105).

Output

You must print the answer on a single line. As it can be rather long, you should print it modulo 1000000007.

Examples
Input
2
Output
4
Input
3
Output
17

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 1079 题。保留原作者与原赛事署名。