#include <iostream>
#include <math.h>
using namespace std;
int fib(int n) {
n++;
double phi = (1 + sqrt(5)) / 2;
return round(pow(phi, n) / sqrt(5));
}
int main()
{
int t;
cin >> t;
while (t > 0)
{
int n;
cin >> n;
cout << fib(n) << endl;
t--;
}
}