Rohan has a special love for the matrices especially for the first element of the matrix. Being good at Mathematics, he also loves to solve the different problem on the matrices. So one day he started to multiply the matrix with the original matrix. The elements of the original matrix are given by

**a _{00}=1 , a_{01}=1, a_{10}=1, a_{11}=0**.

Given the power of the matrix,

**Input:**

The first line contains an integer T denoting the no of test cases. Then T test cases follow.Each test case contains an integer, n.

**Output:**

Print the first element of the matrix i.e. **a _{10}**.

1<=T<=100

1<=n<=10

**Example:**

**Input:**

2

3

8

**Output:**

2

21

**Explanation:**

Take the cube of the original matrix i.e **a ^{3}** and print the first element(

Similarly, for the second case, the first element(

Author: justrelax

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Sulagna | 117 |

RUTVIKHARIPARA | 116 |

janvidavda105190 | 93 |

harshsiddhapura105461 | 93 |

madhursengar24 | 86 |

PiyushPandey4 | 617 |

ASWATHAMA | 561 |

akhyasharma01 | 547 |

john_wick | 521 |

jagrit_07 | 448 |

blackshadows | 5362 |

Ibrahim Nash | 5242 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4598 |

Login to report an issue on this page.