#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long n, i, sum = 0;
    cin >> n;
    for (i = 1; i <= n / 2; i++) sum += pow(2, i);
    cout << sum << endl;
  }
}
