Problem D. Covering

时间限制 2500 ms   内存限制 32 MB

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?
 

输入数据

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}$
 

输出数据

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

样例输入

复制
1
2

样例输出

复制
1
5

提交

请先 登录

© 2025 FAQs Contact About