Coronaviruses reproduce in groups. Recently, they have decided to reproduce themselves on a large scale and they call this project – “Coroproduction”.
There are N coronaviruses in a group with each coronavirus having strength S. While reproducing, the ith coronavirus can transfer Pi strength to the offspring, where Pi is any integer between 1 and S.
The strength of the offspring is equal to the product of all the strengths it received from its parents, that is, the product of all Pi (1 < i < N). It is desired that the strength of the offspring is an even number.
Can you find the no. of ways in which the N coronaviruses can reproduce an offspring whose strength is an even number? Since the answer can be large, compute it modulo 109 + 7.
Input:
Output:
For each test case, print a single line containing one integer - the required no. of ways modulo 109 + 7.
Constraints:
Test Files:
Test File #1 (10 points):
Test File #2 (10 points):
Test File #3 (30 points):
Test File #4 (50 points): original constraints
There are 2 coronaviruses each having strength = 2.
Strength transferred by 1st Coronavirus |
Strength transferred by 2nd Coronavirus |
Strength of Offspring |
1 |
1 |
1 (ODD) |
1 |
2 |
2 (EVEN) |
2 |
1 |
2 (EVEN) |
2 |
2 |
4 (EVEN) |
It is clear that there are 3 ways in which the strength of the offspring can be even.