#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    vector<int> v(n + 1, 0);
    v[2] = 2;
    for (int i = 4; i <= n; i += 2) v[i] = 2 * v[i - 2] + 2;
    cout << v[n] << "\n";
  }
  return 0;
}
