Aniruddha and HackerEarth
14% Success4909 Attempts20 Points1s Time Limit256MB Memory1024 KB Max Code

Aniruddha loves to code on HackerEarth. There are some type of problems which he likes the most. Problems are tagged with non empty strings containing only 'H' or 'E' or both. But he likes the problems tagged with strings containing no consecutive E's. Given an integer N, find maximum number of problems Aniruddha may like which are tagged with strings of length less than or equal to N.

Input
First line contains single integer, T, the number of test cases. Each of next T lines contains single integer N.

Output
For each test case output single integer, the answer to the problem i.e maximum number of problems Aniruddha may like which are tagged with strings of length less than or equal to N. Output answer modulo 109 + 7 (i.e. 1000000007).

Constraints
1T10^6
1N10^6

Examples
Input
2
2
3
Output
5
10

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading Editor...
Results