Given a Bucket having a capacity of N litres and the task is to determine that by how many ways you can fill it using two bottles of capacity of 1 Litre and 2 Litre only. Give the answer in Modulo 10^{9}.

Input:
The first line contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line containing an integer N, where N denotes the capacity of the Bucket.

Output:
For each test case print in a new line the total number of ways in which the Bucket can be filled.

Constraints:
1 ≤ T ≤ 500
1 ≤ N ≤ 1000

Example: Input:
2
3
4 Output:
3
5

Explanation:
Let O denote filling by 1 litre bottle and T denote filling by 2 litre bottle. So we have :
For N=3 {OOO,TO,OT} thus there are 3 total ways.
For N=4 {TT,OOOO,TOO,OTO,OOT} thus there are 5 total ways.