#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; #include using mint = atcoder::modint998244353; int main() { vector dp(1001, 0); dp[1] = 2; for (int i = 2; i <= 1000; ++i) { dp[i] = 2; for (int j = 1; j < i; ++j) dp[i] += 2 * dp[j]; } int t; cin >> t; while (t--) { int n; cin >> n; cout << dp[n].val() << endl; } return 0; }