#include<iostream> using namespace std; int main() { int T,N; long long f[30] = {0}; f[1] = 1; f[2] = 3; for(int i=3;i<=30;i++) { f[i] = f[i-1] + f[i-2]*2; } cin>>T; for(int i=0;i<T;i++) { cin>>N; cout<<f[N]<<endl; } return 0; }