#include <iostream>
using namespace std;
const int N = 60;
long long fib(int n) {
long long dp[n+1];
dp[0] = 0;
dp[1] = 1;
for (int i = 2; i <= n; i++) {
dp[i] = dp[i-1] + dp[i-2];
}
return dp[n];
}
int main() {
int n;
long long a[N];
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a[i];
printf("Fib(%d) = %lld\n", a[i], fib(a[i]));
}
return 0;
}