AMZRCK - Amz Rock

no tags 

To many people in many cultures, music is an important part of their way of life.

AmzMohammad is a fan of rock music. and he have n rock tracks (labelled from 1 to n) now he wants to select a playlist.

In his opinion a good playlist is one that have no two successive tracks.

In how many ways?

Input

First line is the number of test cases.

Each test case in an integer n (number of tracks.)

Output

Output number of good playlists he can make.

Answer is less than 1000000000. it is the only constraint :)

Example

Input:
2
1
2

Output:
2
3

note: a good play list may consist 0 track :)

note 2: how many Persian rock tracks we have?


hide comments
navya_19: 2020-01-26 00:48:00

Input is below 250 i.e. an array with i<250 is enough

sonuverma: 2018-01-09 11:50:35

"in his opinion a good playlist is one that have no two successive tracks."
*concecutive
not successive. :-)

sanyam19: 2018-01-08 13:06:09

easy 1 :)
try to observe d pattern

nikhil2504: 2017-07-27 18:15:09

dp <3

aexpo: 2017-07-27 17:50:25

The tracks in the play list should be in an ascending order only.Do not rearrange them.
The question is a bit unclear though.

srnsh: 2017-01-31 17:16:52

Beware :: Spoilers in Comments --__--

surajmall: 2016-10-12 06:09:03

real time fabonnici use

ranjeetkumar: 2016-06-30 20:09:03

too much spoilers in comment

kolahzary: 2016-03-13 01:17:21

Wrote it in C# but C# is not acceptable for this problem :((
I wonder why !

manas0008: 2016-01-29 05:10:33

got WA when used a direct formula.But AC with a simple precomputation.Just watch first 4,5 consecutive testcases you'll get it.


Added by:mohammad mahmoodi
Date:2012-08-01
Time limit:0.100s-1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GAWK BASH CSHARP GO ICON ICK WHITESPACE
Resource:AmzMohammad ( Mohammad Mahmoodi )