Thanos wants all stones of the universe. One of them is soul stone and it was kept on Vormir planet. Thanos goes on that planet with his daughter Gamora where they were approached by Red Skull who knows everything about the soul stone and how to get that. He tells Thanos that to get soul stone he must lose something that is precious for him. Red Skull suggested that he should sacrifice his daughter but Thanos denied that option because he loves Gamora so much and asked for another way to get stone.
Then the Red Skull gives him an infinite series of numbers made by a function
Some of the numbers are as follows: 6 ,10, 18, 38, 94, 258,...................................
Now he asked him to tell the sum of N numbers of series.
That is defined as:
Find out the value of S(1012)
Since answer can be large compute it in modulo 109+7
NOTE You do not need to create a program for this problem you have to write your answers of given input in given code snippet
Compile and Test can give Wrong Answer. Once you have written your answer, press Submit button to check your result.