#include <iostream>
#include <math.h>
using namespace std;
int fib(int n)
{
int a = 0, b = 1, c = 0;
for (int i = 0; i < n; i++)
{
c = a + b;
a = b;
b = c;
}
return c;
}
int main()
{
int t;
cin >> t;
while (t > 0)
{
int n;
cin >> n;
cout << fib(n) << endl;
t--;
}
}