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