E. That Stacks
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Standard stack sizes in Minecraft are $$$2^6=64$$$ for most blocks and items, $$$2^4=16$$$ for select items, and $$$2^0=1$$$ for tools and special items. However, Mojang's latest update has a lot of bugs, forcing items to stack to exactly any integer power of $$$2$$$, including powers greater than $$$64$$$: $$$128$$$, $$$256$$$, and so on! Since you were down in your mineshaft before the update dropped, you decide to use the opportunity to start moving your supply of gems back to your base above ground.

You have diamonds and emeralds in the mineshaft's storage that you want to bring, but you can't put them in your inventory since you're carrying lots of other important items (i.e. Pigstep and deadbushes). But, you do have a bundle, a portable container that fits exactly $$$N$$$ items. Due to another bug in the update, you can only insert stacks of items in alternating order, but you can start with either diamonds or emeralds. For example, if you first insert a power-of-two stack of diamonds, the next stack you insert must be a power-of-two stack of emeralds.

For example, the bundle might be able to fit $$$4$$$ gems. There are $$$12$$$ possible ways to put them in, shown below. Note that each sequence of the same item must have a length matching some power of $$$2$$$; as such, a length of $$$3$$$ is unable to be added to the bundle.

DEDE, EDED, DDED, EEDE, DEED, EDDE, DEDD, EDEE, DDEE, EEDD, DDDD, EEEE

You're curious about how many different ways you could completely fill your bundle. Given the capacity of the bundle $$$N$$$, determine how many different ways the bundle can be filled. Assume that you have at least $$$N$$$ gems of each type.

Input

The only line of input is integer $$$N$$$ $$$(1 \le N \le 10^5)$$$: the capacity of your bundle.

Output

Output a single integer: the number of ways that you could fill your bundle $$$\text{mod}$$$ $$$10^9+7$$$.

Examples
Input
4
Output
12
Input
5
Output
20
Input
67
Output
564649932
Input
6767
Output
349469276