Simple Arithmetic 3

2 secs 1024 MB
Rute's icon Rute

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

Problem Statement

This year,There are NN 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
1N10181 \leq N \leq 10^{18}

Input

NN

Output

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

Sample Case

Input
4
Output
3

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
1234567890
Output
234567882

This answer can be large, so output the remainder divided by 10000000071000000007.

提出


Go (1.21)