P26112 [AtCoder] Random Card Game
省选
题目描述

Problem Statement

We have 2N cards, with ID numbers from 1 through 2N.
Consider the following game using them.
First, the dealer randomly split the cards into two piles of N cards each.
Here, the dealer also randomly chooses the order of cards in each pile.
Then, the player repeatedly does the operation below until one pile becomes empty, and the number of operations done will be the score.

  • Choose a positive integer k and compare the k-th cards from the top in the two piles. (k should not exceed the number of each pile.) Then, remove the card with the smaller ID number from the pile that contains it.

Assume that a cheater plays this game.
That is, assume that the player can always see the ID numbers of all cards in both piles.
Find the expected value of the score when the player plays optimally to minimize it, modulo (10^9 + 7) (see Notes).

Input

Input is given from Standard Input in the following format:
N

Output

Print the answer.

Constraints

  • $1 \leq N \leq 10^6$

Sample Input 1

1

Sample Output 1

1

Sample Input 2

3

Sample Output 2

486111118

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1
样例输出
1