#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    long long total = 0, w = 0;
    cout << abs(2 - (long long)(pow(2, (n / 2) + 1))) << "\n";
  }
  return 0;
}
