#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    long long int ans = 0;
    ans = (long long int)(4 * pow(2, n / 2 - 1) - 2);
    cout << ans << endl;
  }
  return 0;
}
