You are given the following recurrent formula:
Tn=Tn−1+Tn−2+Tn–3 , at n>3, T1=3,T2=2,T3=1
Calculate the following value, S=(T21+T22+...+T2N)mod(109+7).
Input format
The first line contains one integer N.
Output format
Print S denoting the answer to the problem.
Constraints
1⩽N⩽1018
t[1] = 3
t[2] = 2
t[3] = 1
t[4] = 6
t[5] = 9
t[6] = 16
t[7] = 31
t[8] = 56
S = (3^2+2^2+1^2+6^2+9^2+16^2+31^2+56^2) mod (1e9+7)=4484