#include <bits/stdc++.h>
using namespace std;
bool tests = true;
void solve() {
  int n;
  cin >> n;
  cout << pow(2, n / 2 + 1) - 2 << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  if (tests) {
    cin >> t;
  }
  while (t--) {
    solve();
  }
  return 0;
}
