Simple Arithmetic 3(binary)

2 secs 1024 MB
Rute's icon Rute

注意:この問題文には日本語版がありません。

Problem Statement

This year,There are 2N2^{N} teams entried World BaseBall Contest.
This World BaseBall contest is Tournament, and only 1 team will be Champion.
How many games will it be before a Champion is decided?
However, all matches shall end in a win or a loss, and no tie shall be considered.
This answer can be large, so output the remainder divided by 10000000071000000007.

Constraints

NN is Integer
0N1090 \leq N \leq 10^{9}
・This site doesn't have a partial point system, but I'll just show partial points.
・Full Mark is 100100 Point
・(Constraints 1) N16N \leq 16  (55 Point)
・(Constraints 2) N105N \leq 10^{5}  (3535 Point)
・(Constraints 3) No additional restrictions.  (6060 Point)

Input

NN

Output

Please output "How many games will it be before a Champion is decided".

Sample Case

Input
2
Output
3

There are 22=42^2 = 4 teams Entried.
On the First Round, There are 22 match, 22 teams will be defeated.
On the Second Round(and it is Final Round), 11 teams will be defeated and Champion is decided.
So, The answer is 2+1=32 + 1 = 3, Please output 33.

Sample Case

Input
10000
Output
905611804

This answer can be large, so output the remainder divided by 10000000071000000007.And it contained Constraints 2 Cases.

提出


Go (1.21)