Two's company, three's a crowd!
It's been one year since Chef met his brother. Last year, his younger brother came to visit him during this time of the year. This year, the Chef is planning to go visit his brother. Chef's brother has planned to throw a "Welcome Party" for him. He wants to invite people from his neighbourhood (i.e. from the street where he lives). There are N houses on the street in a single line (not considering the brother's house). He wants the party to be fun and he will not like to invite people who might spoil the mood of the party. If people are invited from three consecutive houses on the street, they might create trouble. As they say, three's a crowd! He doesn't want to ruin the Chef's Welcome Party and so he will not want to send invites to any three consecutive houses. He wants you to tell him how many ways are there for him to go wrong. Note that he can play safe by not inviting anyone to avoid a crowd.

-----Input:-----
First line of the input contains a single integer T, the number of test cases.

Each test case contains a line containing a single integer N described above.

-----Output:-----
For each test case output a single integer denoting the number of ways the brother can go wrong with planning the party.

The answer can get quite large. So output the total number of ways modulo 109+7.

-----Constraints:-----
1<=T<=10000
1<=N<=1015

-----Example:-----Input:
2
3
4

Output:
1
3

Explanation:
Case 1: The only way he can go wrong is by inviting all the houses.
Case 2: First way of getting wrong is by inviting houses (1,2,3). Second way to get wrong is by inviting houses (2,3,4). Third way of going wrong is by inviting all 4 houses i.e. (1,2,3,4).

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'MOD = int(1e9+7)\n\ndef mult(a, b):\n rsp = [[0, 0, 0],\n   [0, 0, 0],\n   [0, 0, 0]]\n\n for i in range(3):\n  for j in range(3):\n   for k in range(3):\n    rsp[i][j] += a[i][k] * b[k][j]\n    rsp[i][j] %= MOD\n\n return rsp\n\nident = [[1, 0, 0],\n   [0, 1, 0],\n   [0, 0, 1]]\nm = [[1, 1, 0],\n  [1, 0, 1],\n  [1, 0, 0]]\n\npowers = [m]\nfor _ in range(53):\n p = powers[-1]\n powers.append(mult(p ,p))\n\ndef pow2(e):\n y = ident\n i = 0\n for p in powers:\n  if e & (1 << i):\n   y = mult(p, y)\n  i += 1\n return y\n\nt = eval(input())\n\nfor _ in range(t):\n n = eval(input())\n\n if n < 3:\n  print(0)\n  continue\n\n r = pow(2, n, MOD)\n b = pow2(n - 2)\n # print(b)\n r -= (4 * b[0][0]) % MOD\n r -= (2 * b[1][0]) % MOD\n r -= b[2][0]\n r = (MOD + r) % MOD\n print(r)\n'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 52469