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