#include <cstdio>
#include <iostream>
using namespace std;
int main()
{
int x;
long long t3 = 0, t1 = 0, t2 = 1;
cin >> x;
while(x--)
{
int y;
cin >> y;
if(y == 0)printf("Fib(0) = %lld\n",t1);
else if(y == 1)printf("Fib(1) = %lld\n",t2);
else if(y > 1)
{
for(int i = 2; i <= y; i++)
{
t3 = t1 + t2;
t1 = t2;
t2 = t3;
}
printf("Fib(%d) = %lld\n",y,t3);
t1 = 0,t2 = 1, t3 = 0;
}
}
return 0;
}