Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

Covering

Time Limit: 5000/2500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 923    Accepted Submission(s): 235


Problem Description
Bob's school has a big playground, boys and girls always play games here after school.

To protect boys and girls from getting hurt when playing happily on the playground, rich boy Bob decided to cover the playground using his carpets.

Meanwhile, Bob is a mean boy, so he acquired that his carpets can not overlap one cell twice or more.

He has infinite carpets with sizes of $1\times 2$ and $2\times 1$, and the size of the playground is $4\times n$.

Can you tell Bob the total number of schemes where the carpets can cover the playground completely without overlapping?
 

Input
There are no more than 5000 test cases.

Each test case only contains one positive integer n in a line.

$1 \leq n \leq 10^{18}$
 

Output
For each test cases, output the answer mod 1000000007 in a line.
 

Sample Input
1 2
 

Sample Output
1 5
 

Statistic | Submit | Clarifications | Back