Consider a playoff tournament where $$$2^n$$$ athletes compete. The athletes are numbered from $$$1$$$ to $$$2^n$$$.The tournament is held in $$$n$$$ stages. In each stage, the athletes are split into pairs in such a way that each athlete belongs exactly to one pair. In each pair, the athletes compete against each other, and exactly one of them wins. The winner of each pair advances to the next stage, the athlete who was defeated gets eliminated from the tournament.The pairs are formed as follows:  in the first stage, athlete $$$1$$$ competes against athlete $$$2$$$; $$$3$$$ competes against $$$4$$$; $$$5$$$ competes against $$$6$$$, and so on;  in the second stage, the winner of the match "$$$1$$$–$$$2$$$" competes against the winner of the match "$$$3$$$–$$$4$$$"; the winner of the match "$$$5$$$–$$$6$$$" competes against the winner of the match "$$$7$$$–$$$8$$$", and so on;  the next stages are held according to the same rules. When athletes $$$x$$$ and $$$y$$$ compete, the winner is decided as follows:  if $$$x+y$$$ is odd, the athlete with the lower index wins (i. e. if $$$x < y$$$, then $$$x$$$ wins, otherwise $$$y$$$ wins);  if $$$x+y$$$ is even, the athlete with the higher index wins. The following picture describes the way the tournament with $$$n = 3$$$ goes.  Your task is the following one: given the integer $$$n$$$, determine the index of the athlete who wins the tournament.

The first line contains one integer $$$t$$$ ($$$1 \le t \le 30$$$) — the number of test cases. Each test case consists of one line containing one integer $$$n$$$ ($$$1 \le n \le 30$$$).

For each test case, print one integer — the index of the winner of the tournament.

NoteThe case $$$n = 3$$$ is shown in the picture from the statement.If $$$n = 1$$$, then there's only one match between athletes $$$1$$$ and $$$2$$$. Since $$$1 + 2 = 3$$$ is an odd number, the athlete with the lower index wins. So, the athlete $$$1$$$ is the winner.

for i in range(int(input())):
    print(2**(int(input()))-1)

from sys import stdin
inp = [*map(int, stdin.read().strip().splitlines())]

for i in range(inp[0]):
    print((2**inp[1:][i])-1)

for _ in range(int(input())):
    n = int(input())
    p = 2**n
    print(2**n-1)

casenum = int(input())

for i in range(casenum):
    print( 2 ** int(input()) - 1)

t = int(input())
def main() :
    n = int(input())
    return 2**n-1

R = []
for _ in range(t) :
    R.append(main())
for ans in R :
    print(ans)

import sys
input = sys.stdin.readline

get_int = lambda: int(input().rstrip())
get_arr = lambda: [int(w) for w in input().split()]
get_str = lambda: input().rstrip()

t = get_int()
for _ in range(t):
    n = get_int()

    print(2**n - 1)

test=int(input())
for i in range(test):
    player=int(input())
    if player<=1:
        print(1)
    else:
        print(pow(2,player)-1)

for i in range (int(input())):
    n = int(input())
    print(2**n-1)

import sys
import math
from collections import defaultdict, Counter
from bisect import *
from string import ascii_lowercase

def readInts():
    x = list(map(int, (sys.stdin.readline().rstrip().split())))
    return x[0] if len(x) == 1 else x

def readList(type=int):
    x = sys.stdin.readline()
    x = list(map(type, x.rstrip('\n\r').split()))
    return x

def readStr():
    x = sys.stdin.readline().rstrip('\r\n')
    return x

write = sys.stdout.write
read = sys.stdin.readline

def solve():
    n = readInts()
    print(pow(2, n) - 1)

def main():
    t = 1
    t = readInts()
    for _ in range(t):
        solve()

if __name__ == '__main__':
    main()

for i in range(int(input())):
    print(2**int(input())-1)

for _ in range(int(input())):
    print((1 << int(input())) - 1)

# codeforces 1651A playoff

# 2**n athletes compete
# athletes are numbered
# n stages
#
t = int(input())
for i in range(t):
    n = 2**int(input())

    if n == 1:
        print(1)
    else:
        print(n-1)

l=[]
t=int(input())
for i in range(1,t+1):
    n=int(input())
    l.append(n)
for i in range(0,t):
     print(pow(2,l[i])-1)

a=int(input())
for i in range(a):
    b=int(input())
    print(2**b-1)

t = int(input())
while t > 0:
    print(2 ** int(input()) - 1)
    t-=1

# main.py

# D <--~~~  __      _
# U       o'')}____//
# O       `_/      )
# N       (_(_/-(_/
# G ~~~~~~~~~~~~~~~~~-->

MOD_PRIME = 10**9 + 7

def inp(to: type = str):
    return to(input())

def inp_arr(to: type = str):
    return list(
        map(to, inp().split())
    )

def swap(A, i, j):
    A[i], A[j] = A[j], A[i]

def MEX(a):
    b = range(0, max(a)+2)
    return min(set(b)-set(a))

def solve():
    n = inp(int)
    print(pow(2, n)-1)

def main():
    for _ in range(inp(int)):
        solve()
    return

if __name__ == "__main__":
    main()

n = int(input())
for i in range(n):
    athlete = 2**int(input())
    print(athlete-1)

def answer():
    n = int(input())
    print(2**n - 1)

for _ in range(int(input())):
    answer()

a = int(input())
for i in range (0,a):
 b= int (input())
 c = (2**b) -1
 print(c)

def solve():
    x = int(input())
    a = 1
    for j in range(1,x+1):
        a*=2
    print(a-1)
case = int(input())
for _ in range(case):
   solve()

import io
import os

input = io.BytesIO(os.read(0, os.fstat(0).st_size)).readline

def solve():
    n = int(input())
    print(2**n-1)

t = int(input())

for _ in range(t):
    solve()

for _ in range(int(input())):
    print(2**int(input()) - 1)

# https://codeforces.com/contest/1651

answer = ""

def eval_case(expo):
    global answer, match_expo_winner
    if expo == 1:
        return 1

    return (1 << expo) - 1

if __name__ == '__main__':
    numCases = int(input())
    for i in range(numCases):
        expo = int(input())
        answer += str(eval_case(expo)) + "\n"
    print(answer)

for i in range(int(input())):
    a=int(input())
    b=lambda x:(2**x)-1
    print(b(a))

import sys
import math
from sys import stdin
for _ in range(int(stdin.readline())):
    n= int(stdin.readline())

    print((2**n)-1)

from sys import stdin, stdout
t = int(stdin.readline())
for i in range(t):
    n = int(stdin.readline())
    stdout.write(f"{(1<<n)-1}\n")

t=int(input())
for i in range(t):
    n=int(input())
    print(2**n-1+1-1)

t=int(input())
for i in range(t):
    n=int(input())
    print((2**n)-1)

# # n= int(input())
# # s=[]
# #
# # for i in range(0,n):
# #     s.append(int(input()))
# #
# # for p in s:
# #
# #
#
#
# x = int(input())
# l = []
# n = pow(2, x)
# for j in range(1, n + 1):
#     l.append(j)
#
# while (len(l) != 1):
#     i = 0
#
#     while (i < len(l) - 1):
#         s = l[i] + l[i + 1]
#
#         if (s % 2 == 0):
#
#             l.remove(l[i])
#
#         else:
#             l.remove(l[i + 1])
#
#         i = i + 1
# print(l[0])
for i in range(int(input())):
    print(2**int(input())-1)

t = int(input())
for i in range(t):
    n = int(input())
    x = pow(2,n)
    print(x-1)

t = int(input())
for i in range(t):
    n = int(input())
    if n==1:
        print(1)
    else:
        print(2**n-1)

t = int(input())
print(*[2 ** int(input()) - 1 for i in range(t)], sep="\n")

from sys import stdin

t=int(stdin.readline())
while t>0:
    t-=1
    n=int(stdin.readline())
    print(2**n-1)

t = int(input())

for i in range(t):
    n = int(input())
    print(2**n - 1)

    # r,l,a = map(int,input().strip().split())
    # if r == l:
    #     if l == a:
    #         print(1)
    #     else:
    #         print((l//a) + (l%a))
    # elif l < a:print(l)
    # elif l == a:print(a-1)
    # else:
    #     if l%a != 0:print((l//a) + (l%a))
    #     else:print(((l-1)//a)+((l-1)%a))

    # s = input()
    # c = input()
    # if c in s:
    #     if(s.index(c)%2 == 0 and (len(s)-s.index(c)-len(c))%2 ==0):
    #         print("YES")
    #     else:
    #         print("NO")
    # else:
    #     print("NO")
    # if len(s) == len(c):
    #     if s == c:
    #         print("YES")
    #     else:
    #         print("NO")
    # else:
    #     j = 0
    #     n = len(s)
    #     while(j < n):
    #         if s[j] == c:
    #             print("YES")
    #             break
    #         j  = j + 2
    #     else:
    #         print("NO")

t=int(input(""))
for z in range(t):
    n=int(input(""))
    p=2**n
    print(p-1)

cases = int(input())
for x in range(cases):
    n = int(input())
    print((2**n)-1)

import sys
from math import factorial
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(s[:len(s) - 1])
def invr():
    return(map(int,input().split()))
def insr2():
    s = input()
    return(s.split(" "))

q = inp()
for _ in range(q):
    def solve():
        n = inp()
        print(2**n-1)

        return
    solve()

#!/usr/bin/env python
# -*- coding: utf-8 -*-

T = int(input())
while T:
    T -= 1
    n = int(input())
    print(2**n - 1)

for i in range(int(input())):
    print(2**(int(input()))-1)

import sys
def print(a):
    sys.stdout.write(str(a)+'\n')
def input():
    return sys.stdin.readline().strip()
for _ in range(int(input())):
    n=int(input())
    print(2**n-1)

from sys import stdin, setrecursionlimit
input = stdin.readline

from bisect import bisect_left, bisect_right
from collections import deque
from functools import lru_cache, reduce
from heapq import heappush, heappop
from math import sqrt, ceil, floor, log2

T = int(input())

def rl(t = int):
    return list(map(t, input().split()))

for t in range(1, T + 1):
    n = int(input())

    print((1 << n) - 1)

t=int(input())

for _ in range(t):
    n=int(input())
    print(2**n-1)

cases = int(raw_input().strip())

for c in xrange(cases):
    numMatches = int(raw_input().strip())
    numPlayers = pow(2, numMatches)
    print numPlayers - 1

t = int(input())
for i in range (t) :
    n = int(input())
    print(2 ** n - 1)

t=int(input())
while t:
    n=int(input())
    print(2**n-1)
    t-=1

t = int(input())
for i in range(t):
    n = int(input())
    print(2**n-1)

for _ in range(int(input())):
    n = int(input())
    print((2**n)-1)

t=int(input())
l2=[]
for i in range(t):
    n=int(input())
    l2.append(2**n-1)

for elem in l2:
    print(elem)

x = int(input())
for i in range(x):

    print(2**int(input())-1)

n_prob = int(input())

for _ in range(n_prob):
    print(2**(int(input()))-1)

t = int(input())
for i in range(t):
    n = int(input())
    if n==1:
        print(1)
    else:
        print((2**n)-1)

for i in range(int(input())):
    n=int(input())
    print(max(2**n-1,1))

n=int(input())
for _ in range(n):
    x=int(input())
    print(2**x-1)

for _ in range(int(input())):
	n = int(input())
	print(2 ** n  - 1)

for i in range(int(input())):
    temp = input()
    val = int(temp)
    val = 2**val - 1
    print(val)

t = int(input())
for i in range(t):
    n = int(input())
    if n==1:
        print(1)
    else:
        print(2**n-1)

t = int(input())

for _ in range(t):
    n = int(input())
    print(2 ** n - 1)

t=int(input())
for i in range(t):
    n=int(input())
    print((2**n)-1)

lenght = int(input())
answers = []

for i in range (lenght):
    x = int(input())
    answers.append((2**x)-1)
for i in answers:
    print(i)

t = int(input())

for i in range(t):
    n = int(input())
    if n == 1:
        print(1)
    else:
        print(2**n - 1)

t = int(input())
for i in range(t):
    n = int(input())
    print((2 ** n) - 1)

t=int(input())
for i in range(t):
    n=int(input())
    x=pow(2,n)
    print(x-1)

t=int(input())
for i in range(t):
    n=int(input())
    print(2**n-1)

s = int(input())
for _ in range(s):
  n = int(input())
  print(2 ** n - 1)

from sys import stdin

t=int(stdin.readline())
while t>0:
    t-=1
    n=int(stdin.readline())
    print(2**n-1)

from cgi import test

testCases = int(input())
winners = list()
for i in range(testCases):
    N = int(input())
    winningath = pow(2,N) -1
    winners.append(winningath)

for x in winners:
    print(x)

t=int(input())
for i in range(t):
    n=int(input())
    if n==1:
        print(1)
    else:
        print((2**n)-1)

game_nums = int(input())

for i in range(game_nums):
    g = int(input())
    print(2 ** g - 1)

import sys
import math
from sys import stdin
for _ in range(int(stdin.readline())):
    n= int(stdin.readline())

    print((2**n)-1)

j = int(input())
for i in range(j):
    n = int(input())
    print(int(pow(2,n)-1))

for _ in range(int(input())):
    n = int(input())
    print((1<<n)-1)

for _ in range(int(input())):
    n = int(input())
    if n == 1:
        print(1)
    else:
        print(2**n-1)

def main ():
    tests = int(input())
    for i in range(tests):
        n = int(input())
        print((2**n)-1)

main()

for t in range(int(input())):
    n = int(input())
    if(n == 1):
        print(1)
    else:
        print(2**n - 1)

#https://codeforces.com/blog/entry/71884

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))

t = inp()
for _ in range(t):
    n = inp()
    print((2 ** n) - 1)

for _ in range(int(input())):
    print(2 ** int(input()) - 1)

# cook your dish here
for i in range(int(input())):
    n=int(input())
    if n==1:
        print(1)
    else:
        print(2**n-1)

for _ in range(int(input())):
    print(2**int(input()) - 1)

import sys

# Mike change this based on the codeforces problem.
linesPerTest = 1

testArguments = []

i = 0
totalLines = 1

# Read all the lines from stdin, write them to testCasesUnformatted.
while i <= totalLines:
    line = sys.stdin.readline().rstrip('\n')
    if i == 0:
    	totalLines = linesPerTest * int(line)
    else:
        testArguments.append(line)
    i += 1

# Group the test arguments into test cases.
testCases = []
for j in range(0, len(testArguments), linesPerTest):
	testCases.append(testArguments[j:j + linesPerTest])

def f(testArguments):
    n = int(testArguments[0])
    return 2**n - 1

for testCase in testCases:
	print(f(testCase))

for _ in range(int(input())):
    n=int(input())
    x=2**n-1
    if n==1:
        print("1")
    else:
        print(x)

for _ in range(int(input())):
    n = int(input())
    print((1 << n) - 1)

n = int(input())
for i in range(n):
    a = int(input())
    print(2**a - 1)

t = int(input())
for i in range(t):
    n = int(input())
    if n==1:
        print(1)
    else:
        print((2**n)-1)

def answer():
    n = int(input())
    print(2**n - 1)

for _ in range(int(input())):
    answer()

for i in range(int(input())):
    print(2 ** int(input()) - 1)

t=int(input())
for i in range(t):
    n=int(input())
    if n==1:
        print(1)
    else:
        print((2**n)-1)

from sys import stdin
raw_input = lambda: stdin.readline().rstrip()
input = lambda: int(raw_input())
I=lambda: map(int, raw_input().split())
t = input()
for _ in xrange(t):
	n = input()
	print (2**n) - 1

for i in range(int(input())):
    print(2**(int(input()))-1)

t = int(input())
for i in range(t):
    n = int(input())
    x = (2**n)-1
    print(x)

# A

import sys
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))

def sol(n):
    return 2 ** n - 1

num_tests = inp()
for _ in range(num_tests):
    sys.stdout.write(str(sol(inp()))+'\n')

def play_off(n):
    h=2**n
    return h-1

t=int(input())
for i in range(t):
    n=int(input())
    print(play_off(n))

t=int(input())

for _ in range(t):
    n=int(input())
    print(2**n-1)

t = int(input())
for i in range(t):
    n = int(input())
    print(2 ** n - 1)

for i in range(int(input())):
	a = int(input())
	print((a**2)-1)

t = int(input())
while t != 0:
    n = int(input())
    x = pow(n, 2)
    print(x-1)
    t -= 1

from math import *
from collections import *
import os
from io import BytesIO, IOBase
import sys
from bisect import *
from heapq import *

MOD = 1000000007
# sys.setrecursionlimit(10**6)

# Code by Big Dick Daddy Dick

def subinp():
    sys.stdin = open("input.txt", "r")
    sys.stdout = open("op1.txt", "w")

def binpow(a, b, m):
    a %= m
    x = 1
    while b > 0:
        if b & 1:
            x = x * a % m
        a = a * a % m
        b >>= 1
    return x

def binser(arr, l, r, x):
    while l < r:
        mid = l + (r - l) // 2
        # print(l, r, mid)

        if arr[mid] == x:
            return mid

        elif arr[mid] < x:
            l = mid + 1

        else:
            r = mid - 1

    return mid

def lcm(a, b):
    return (a * b) // gcd(a, b)

def sod(n):
    l = list(str(n))
    s = 0
    for i in l:
        s += int(i)
    return s

def prime_factors(num):
    l =[]
    if num % 2:
        l.append(2)
    while num % 2 == 0:
        num = num / 2

    for i in range(3, int(sqrt(num)) + 1, 2):
        if not num % i:
            l.append(i)
        while num % i == 0:
            num = num / i
    if num > 2:
        l.append(num)
    return l

def factmod(n, p):

    f = defaultdict(int)
    f[0] = 1
    for i in range(1, n + 1):
        f[i] = (f[i-1] * i) % MOD

    """
    res = 1
    while (n > 1):
        if (n//p) % 2:
            res = p - res

        res = res * f[n%p] % p
        n //= p
    """

    return f

def largestPower(n, p):

    # Initialize result
    x = 0

    # Calculate x = n/p + n/(p^2) + n/(p^3) + ....
    while (n):
        n //= p
        x += n
    return x

def modFact(n, p) :

    if (n >= p) :
        return 0

    res = 1
    isPrime = [1] * (n + 1)
    i = 2
    while(i * i <= n):
        if (isPrime[i]):
            for j in range(2 * i, n, i) :
                isPrime[j] = 0
        i += 1

    # Consider all primes found by Sieve
    for i in range(2, n):
        if (isPrime[i]) :

            k = largestPower(n, i)

            # Multiply result with (i^k) % p
            res = (res * binpow(i, k, p)) % p

    return res

def drec(x, y):
    if y == x + 1:
        return 'R'
    if y == x - 1:
        return 'L'
    if x < y:
        return 'D'
    return 'U'

def cellhash(x, y):
    return (x - 1) * m + y

def bins(l, x, n):
    i = bisect_left(l, x)
    if i < n:
        return i
    if i:
        return (i-1)
    else:
        return n

def cond(l):
    for i in range(len(l) - 1):
        if l[i] == str(int(l[i + 1]) - 1):
            return False
    return True

def isvowel(s):
    if s in list("aeiou"):
        return 1
    return 0

def countOdd(L, R):

    N = (R - L) // 2

    # if either R or L is odd
    if (R % 2 != 0 or L % 2 != 0):
        N += 1

    return N

def tst(A, B, C):
    return ((A|B) & (B|C) & (C|A))

def palcheck(n, s):
    i, j = 0, n - 1
    while i <= j:
        if s[i] == s[j]:
            return False
        i += 1
        j -= 1
    return True

def sakurajima(n):
    if n < 9:
        n = 10
    l = [0]

    for i in range(1, n + 1):
        if i % 2:
            l.append(i)
        else:
            l.append(2)

    for i in range(3, int(n ** 0.5) + 1, 2):
        if l[i] == i:
            for j in range(i * i, n + 1, i):
                if l[j] == j:
                    l[j] = i
    return l

def getfact(x):
    ret = []
    d = defaultdict(int)
    while x != 1:
        ret.append(spf[x] ** (d[spf[x]] + 1))
        d[spf[x]] += 1
        x = x // spf[x]

    return ret

def prchck(n):
    l = [1] * (n + 1)
    l[1] = 0
    for i in range(2, n + 1):
        for j in range(2, int(sqrt(n)) + 1):
            if j % i == 0:
                l[j] = 1
    return l

def ispal(s, n):
    for i in range(n // 2):
        if s[i] != s[n - i - 1]:
            return False
    return True

def bfs(src, dest, ajl, vis):
    q = deque([src])
    vis[src] = True

    while q:
        i = q.popleft()
        if i == dest:
            return True
        for j in ajl[i]:
            if not vis[j]:
                vis[j] = True
                q.append(j)
    return False

def sieve(n):
    if n < 9:
        nn = 10
    l = [1] * (n + 1)
    for i in range(2, int(n ** 0.5) + 1):
        if l[i]:
            for j in range(i ** 2, n + 1, i):
                if j % i == 0:
                    l[j] = 0
    l[1] = 0
    return l

class DisjSet:
    def __init__(self, n):
        self.size = [1] * n
        self.parent = [i for i in range(n)]

    def find(self, x):
        if (self.parent[x] != x):
            self.parent[x] = self.find(self.parent[x])

        return self.parent[x]

    def union(self, x, y):

        xset = self.find(x)
        yset = self.find(y)

        if xset == yset:
            return

        if self.size[xset] < self.size[yset]:
            self.parent[xset] = yset
            self.size[yset] += self.size[xset]

        else:
            self.parent[yset] = xset
            self.size[xset] += self.size[yset]

def dfs(i, ajl, vis, l, x):
    vis[i] = True
    l[i] = x

    for j in ajl[i]:
        if not vis[j]:
            dfs(j, ajl, vis, l, x)

# spf = sakurajima(10 ** 5 + 1)
def checkpo3(N):
    while N > 0:

        if N % 3 == 2:
            return False
        N //= 3

    return True

def sumofdig(n):
    ans = 0
    s = str(n)
    for i in s:
        ans += int(i)
    return ans

def panda(n, a, b):
    x, y, z, w = float(inf), float(inf), float(inf), float(inf)

    for i in a:
        x = min(x, abs(b[0] - i))
        y = min(y, abs(b[-1] - i))

    for i in b:
        z = min(z, abs(a[0] - i))
        w = min(w, abs(a[-1] - i))

    ans = x + y + z + w

    ans = min(ans, abs(b[0] - a[0]) + abs(b[-1] - a[-1]), abs(a[-1] - b[0]) + abs(b[-1] - a[0]), x + z + abs(b[-1] - a[-1]), x + w + abs(a[0] - b[-1]), y + z + abs(a[-1] - b[0]), y + w + abs(a[0] - b[0]))

    return ans

# Code by Big Dick Daddy Dick

# n = int(input())
# n, k = map(int, input().split())
# s = input()
# l = list(map(int, input().split()))

# input = sys.stdin.readline
t = 1
t = int(input())
for _ in range(t):
    n = int(input())
    print(2 ** (n - 1))
    # print("Case #" + str(_ + 1) + ": " + str(ans))

for _ in range(int(input())):
    n = int(input())
    if n % 2 == 0:
        print(2**n)
    else:
        print(2**n-1)

import math

t=int(input())
while(t > 0):
  t-=1
  n = int(input())
  z = math.pow(2,n)
  print(z-1)

t = int(input())
for i in range(t):
    n = int(input())
    x = 2^n-1
print(x)

t = int(input())

N = []

for i in range(t):
    n = int(input())
    N.append(n-1)

for n in N:
    print(n)

testcases = int(input())

for a in range(testcases) :
    winner = []
    contestant = []
    semiContestant = []
    participant = pow(2,int(input()))

    if participant == 1 :
        print("1")
        break

    for b in range(1,participant):
        contestant.append(b)

    for c in range(1,participant) :
        if c % 2 != 0 :
            semiContestant.append(c)

    print(contestant)

    while True :
        if len(semiContestant) == 1:
            break
        first = semiContestant.pop(0)
        second = semiContestant.pop(0)

        if (first + second) % 2 == 0 :
            semiContestant.append(second)
        else :
            semiContestant.append(first)
    print(semiContestant.pop())

for _ in range(int(input())):
    n=int(input())
    a=[]
    for i in range(1, 2**n+1):
        a.append(i)
    b=[]
    print(a)
    while len(a)>1:
        for i in range(0,len(a)-1,2):
            if (a[i]+a[i+1])%2==0:
                b.append(a[i+1])
            else:
                b.append(a[i])
        a=b
        b=[]
    print(a[0])

n = int(input())
for whj in range(n):
    a = int(input())
    b = 2**a
    L = [i for i in range(1,1+b)]
    L_help = [i for i in range(1,1+b)]
    for i in range(a):
        for i in range(len(L)//2):
            if (L[i] + L[i+1]) % 2 == 1:
                L_help.remove(max(L[i],L[i+1]))
            else:
                L_help.remove(min(L[i],L[i+1]))
            print(L_help[i])
        L = L_help
    print(L[0])
# Sat Apr 09 2022 08:19:20 GMT+0000 (Coordinated Universal Time)

def solve(n):
    for i in range(2 ** n, 1, -1):
        if i & 1 == 1:
            return i
T = int(input())
for _ in range(T):
    n = int(input())
    print(solve(n))

n=int(input())
print(n**2-1)
# Wed Apr 20 2022 06:23:32 GMT+0000 (Coordinated Universal Time)

# Wed Apr 20 2022 06:23:38 GMT+0000 (Coordinated Universal Time)

for _ in range(int(input())):
	n = int(input())
	if(n == 2):
		print(1)
	else:
		print(2**n - 1)

for i in range(int(input())):
    n = int(input())
    if n%2 == 0:
        print(n-1)
    else:
        print(n)

n=int(input())
print(n**2-1)
# Wed Apr 20 2022 06:23:32 GMT+0000 (Coordinated Universal Time)

test_cases = int(input())

for i in range(test_cases):
    n = int(input())
    passed_first_stage = list(range(1, n ** 2, 2))

    for j in range(n - 1):
        passed_first_stage = list(set(passed_first_stage))
        for k in range(len(passed_first_stage) - 1):
            if k % 2 == 0:
                if (passed_first_stage[k] + passed_first_stage[k + 1]) % 2 == 0:
                    passed_first_stage[k] = passed_first_stage[k + 1]
                else:
                    passed_first_stage[k + 1] = passed_first_stage[k]

    if len(passed_first_stage) == 0:
        print(1)
    else:
        print(passed_first_stage[0])

a= int(input())
for i in range (0,a):
 b= int(input())
 c= 2**b
 print(c)

for t in range(int(input())):
    n = int(input())
    if(n > 19):
        print("NO")
    else:
        print("YES")
        for i in range(n):
            print(3**i, end=" ")
        print()

import os
from io import BytesIO, IOBase
import sys
import math
def split(word):
   return [char for char in word]
def ncr(n, r, p):
	# initialize numerator
	# and denominator
	num = den = 1
	for i in range(r):
		num = (num * (n - i)) % p
		den = (den * (i + 1)) % p
	return (num * pow(den,p - 2, p)) % p
def main():
      for i in range(int(input())):
         n=int(input())
         print(n**2-1)
# region fastio
BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == "__main__":
    main()

n=int(input())
for _ in range(n):
    x=int(input())
    print(x-1)

x = int(input())
if x==1:
	print (1)
else:
	print(2**x-1)

import itertools
import heapq
import collections
import math
import sys

input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return (int(input()))

def inlt():
    return (list(map(int, input().split())))

def insr():
    s = input()
    return (list(s[:len(s) - 1]))

def invr():
    return (map(int, input().split()))

def inis():
    return (input().split())

def stlt():
    return list(map(str, input().split()))

###################################################

# # Code to find top 3 elements and their counts
# # using most_common
#
# arr = [1, 3, 4, 1, 2, 1, 1, 3, 4, 3, 5, 1, 2, 5, 3, 4, 5]
# counter = Counter(arr)
# top_three = counter.most_common()
# print(sorted(top_three))
#
#
# # Python code to find 3 largest and 4 smallest
# # elements of a list.
#
# grades = [110, 25, 38, 49, 20, 95, 33, 87, 80, 90, 110]
# print(heapq.nlargest(3, grades))
# print(heapq.nsmallest(4, grades))

########################################################################
#-----------------------------Functions--------------------------------#
########################################################################

def SieveOfEratosthenes(n):
    prime = [True for i in range(n + 1)]
    p = 2
    l = []
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n + 1, p):
                prime[i] = False
        p += 1
    for p in range(2, n + 1):
        if prime[p]:
            l.append(p)
    return l

def isPrime(n):
    prime_flag = 0

    if n > 1:
        for i in range(2, int(math.sqrt(n)) + 1):
            if n % i == 0:
                prime_flag = 1
                break
        if prime_flag == 0:
            return True
        else:
            return False
    else:
        return False

def gcdofarray(a):
    x = 0
    for p in a:
        x = math.gcd(x, p)
    return x

# method to print the divisors
def printDivisors(n):
    # Note that this loop runs till square root
    i = 1
    ans = []
    while i <= math.sqrt(n):

        if (n % i == 0):

            # If divisors are equal, print only one
            if (n / i == i):
                ans.append(i)
            else:
                # Otherwise print both
                ans.append(i)
                ans.append(n // i)
        i = i + 1
    ans.sort()
    return ans

def CountDivisors(n):
    # Note that this loop runs till square root
    i = 1
    ans = []
    while i <= math.sqrt(n):

        if (n % i == 0):

            # If divisors are equal, print only one
            if (n / i == i):
                ans.append(i)
            else:
                # Otherwise print both
                ans.append(i)
                ans.append(n // i)
        i = i + 1
    ans.sort()
    return len(ans)

def binaryToDecimal(n):
    return int(n, 2)

def countTriplets(a, n):
    s = set()
    for i in range(n):
        s.add(a[i])
    count = 0
    for i in range(n):
        for j in range(i + 1, n, 1):
            xr = a[i] ^ a[j]
            if xr in s and xr != a[i] and xr != a[j]:
                count += 1
    return int(count // 3)

def generate_twin_prime(n):
    a = 0
    for i in range(1, n + 1):
        j = i + 2
        if isPrime(i) and isPrime(j):
            if 2 ^ (i ^ j) == 0:
                a += 1
    return a

def smallestDivisor(n):
    if (n % 2 == 0):
        return 2
    i = 3
    while (i * i <= n):
        if (n % i == 0):
            return i
        i += 2
    return n

def countOdd(L, R):
    N = (R - L) // 2

    # if either R or L is odd
    if (R % 2 != 0 or L % 2 != 0):
        N += 1

    return N

def isPalindrome(s):
    return s == s[::-1]

def sufsum(test_list):
    test_list.reverse()
    res = [sum(test_list[: i + 1]) for i in range(len(test_list))]
    return res

def prsum(lst):
    return (list(itertools.accumulate(lst)))

def badachotabadachota(nums):
    nums.sort()
    i = 0
    j = len(nums) - 1
    ans = []
    cc = 0
    while len(ans) != len(nums):
        if cc % 2 == 0:
            ans.append(nums[j])
            j -= 1
        else:
            ans.append(nums[i])
            i += 1
        cc += 1
    return ans

# ########################################################################
# #-----------------------------Code Here--------------------------------#
# ########################################################################

for _ in range(inp()):
    # n = inp()
    # u = inlt()
    # s = inlt()
    # d = {}
    # ans = []
    # for i in range(n):
    #     if u[i] in d:
    #         d[u[i]].append(s[i])
    #     else:
    #         d[u[i]] = []
    #         d[u[i]].append(s[i])
    # print(d)
    n = inp()
    if n == 1:
        print(1)
    else:
        print(n ** 2 - 1)

for i in range(int(input())):
    n=int(input())
    if(n%2!=0):
        print(2**n - 1)
    else:
        print(n-1)

t=int(input())
for i in range(t):
    n=int(input())
    print((n**2)-1)

s = int(input())
for _ in range(s):
  n = int(input())
  print(n ** 2 - 1)

t = int(input())

N = []

for i in range(t):
    n = int(input())
    N.append(n-1)

for n in N:
    print(n)

for _ in range(int(input())):
	n = int(input())
	if 3**(n-1) > 10**9:
		print("NO")
	else:
		print("YES")
		print(*[3**x for x in range(n)])

# function uses recursion to compute winner athlete depending on conditions
def game (test) :
    length = len(test)
    if length == 1 :
        print(f"{test[0]}") #printing the winner athlete
        return 0
    j = 1
    while j <= length/2 :
        i = j - 1
        if (test[i] + test[j]) % 2  == 0 :
            if test[i] >= test[j] :
                del(test[j])
            else :
                del(test[i])
        elif test[i] >= test[j] :
            del(test[i])
        else :
            del(test[j])
        j += 1
    return game (test)
athlete = int(input()) # promping the number of stages
my_list = []
for i in range(1,(2**athlete+1),1) :
    my_list.append(i)
game(my_list)

import math
t=int(input())
for i in range(t):
    n=int(input())
    x=math.pow(2,n)
    ans=x-1
    print(ans)

# SHRi GANESHA    author: Kunal Verma #
import os
import sys
from bisect import bisect_left
from collections import deque
from heapq import heapify, heappush, heappop
from io import BytesIO, IOBase
from math import inf, gcd

def lcm(a, b):
    return (a * b) // gcd(a, b)

'''
    mod = 10 ** 9 + 7
    fac = [1]
    for i in range(1, 2 * 10 ** 5 + 1):
        fac.append((fac[-1] * i) % mod)
    fac_in = [pow(fac[-1], mod - 2, mod)]
    for i in range(2 * 10 ** 5, 0, -1):
        fac_in.append((fac_in[-1] * i) % mod)
    fac_in.reverse()
    def comb(a, b):
        if a < b:
            return 0
        return (fac[a] * fac_in[b] * fac_in[a - b]) % mod
'''
# MAXN = 10000004
# spf = [0 for i in range(MAXN)]
# adj = [[] for i in range(MAXN)]
def sieve():
    global spf, adj, MAXN
    spf[1] = 1
    for i in range(2, MAXN):
        spf[i] = i

    for i in range(2, MAXN):
        if i * i > MAXN:
            break
        if (spf[i] == i):
            for j in range(i * i, MAXN, i):
                if (spf[j] == j):
                    spf[j] = i
def getdistinctFactorization(n):
    global adj, spf, MAXN
    for i in range(1, n + 1):
        index = 1
        x = i
        if (x != 1):
            adj[i].append(spf[x])
        x = x // spf[x]
        while (x != 1):
            if (adj[i][index - 1] != spf[x]):
                adj[i].append(spf[x])
                index += 1
            x = x // spf[x]
def printDivisors(n):
    i = 2
    z = [1, n]
    while i <= sqrt(n):
        if (n % i == 0):
            if (n / i == i):
                z.append(i)
            else:
                z.append(i)
                z.append(n // i)
        i = i + 1
    return z
def create(n, x, f):
    pq = len(bin(n)[2:])
    if f == 0:
        tt = min
    else:
        tt = max
    dp = [[inf] * n for _ in range(pq)]
    dp[0] = x
    for i in range(1, pq):
        for j in range(n - (1 << i) + 1):
            dp[i][j] = tt(dp[i - 1][j], dp[i - 1][j + (1 << (i - 1))])
    return dp
def enquiry(l, r, dp, f):
    if l > r:
        return inf if not f else -inf
    if f == 1:
        tt = max
    else:
        tt = min
    pq1 = len(bin(r - l + 1)[2:]) - 1
    return tt(dp[pq1][l], dp[pq1][r - (1 << pq1) + 1])
def SieveOfEratosthenes(n):
    prime = [True for i in range(n + 1)]
    p = 2
    while (p * p <= n):
        if (prime[p] == True):
            for i in range(p * p, n + 1, p):
                prime[i] = False
        p += 1
    x = []
    for i in range(2, n + 1):
        if prime[i]:
            x.append(i)
    return x

def main():
    for _ in range(int(input())):

        n=int(input())
        n=2**n
        print(n-(n%2)^1)

# Fast IO Region
BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

if __name__ == '__main__':
    main()

t = int(input())
for i in range(t):
    n = int(input())
    if n==2:
        print(1)
    else:
        print((2**n)-1)

t = int(input())
for i in range(t):
    n = int(input())
    x = 2^n-1
    print(x)

#----------------------------IMPORTING LIBRARIES----------------------------#
import gc
import math
from math import log2
import heapq
from math import floor, ceil
from collections import deque
from posixpath import curdir
from re import L
import sys
from collections import Counter
#----------------------------LAMBDAS AND DEFAULT----------------------------#
I = lambda:list(map(int,input().split()))
MAP = lambda:map(int, input().split())
input = sys.stdin.readline
sys.setrecursionlimit(10000)

MOD = 998244353
#-----------------------------STANDARD FUNCTIONS----------------------------#
def lcm(a, b):
    return abs(a*b) // math.gcd(a, b)

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)

def isSubsequence(s, t):
    for i in range (0, len(s)):
        try:
            index = t.index(s[i])
        except ValueError:
            return False
        t = t[index+1:]
    return True

def bisect_right(a, x):
        lo, hi = 0, len(a)
        while lo < hi:
            mid = lo + (hi - lo) // 2
            if a[mid] > x: hi = mid
            else: lo = mid + 1
        return lo

def bisect_left(a, x):
    lo, hi = 0, len(a)
    while lo < hi:
        mid = lo + (hi - lo) // 2
        if a[mid] < x: lo = mid + 1
        else: hi = mid
    return lo

def binary_search(nums, target):
    left, right = 0, len(nums) - 1
    while left <= right:
        pivot = left + (right - left) // 2
        if nums[pivot] == target:
            return pivot
        if target < nums[pivot]:
            right = pivot - 1
        else:
            left = pivot + 1
    return -1

#------------------------------HELPER FUNCTION------------------------------#
def prefixSum(arr):
    dp = [arr[0]]
    arrLen = len(arr)
    for i in range(1, arrLen): dp.append(dp[-1] + arr[i])
    return dp

def suffixSum(arr):
    arrLen = len(arr)
    dp = [0] * arrLen
    dp[-1] = arr[-1]
    for i in range(arrLen-2, -1, -1): dp[i] = dp[i+1] + arr[i]
    return dp

def fun():
    return

MAX = 10**6 + 2

def solve():
    N = int(input())
    if N == 1:
        print(1)
    elif N == 2:
        print(2)
    else:
        print(2**N-1)

#---------------------------------DRIVER CODE--------------------------------#
TC = int(input())
#TC = 1
for testcases in range(TC):
    solve()

# ------------------- fast io --------------------
from __future__ import division, print_function
import os
import sys
from io import BytesIO, IOBase
import itertools
if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip
BUFSIZE = 8192
class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)

class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")
if os.path.exists('input.txt'):
    sys.stdin = open('input.txt','r')
    sys.stdout = open('output.txt','w')

# ----------------- fast io --------------------
from math import *
from itertools import * # chain,groupby,permutations,combinations
from collections import * #deque
from bisect import *
from heapq import *
from random import *

"""

def gcd(x, y):

    while y:
        x, y = y, x % y
    return x

def prod(a, mod=10**9+7):
    ans = 1
    for each in a:
        ans = (ans * each) % mod
    return ans

def lcm(a, b): return a * b // gcd(a, b)

def binary(x, length=16):
    y = bin(x)[2:]
    return y if len(y) >= length else "0" * (length - len(y)) + y

def powerset(s):
    n=len(s)

    return chain.from_iterable(combinations(s,r) for r in range(1,n))

def binarySearch(arr,x):
    l=0
    r=len(arr)-1
    while l <= r:

        mid = l + (r - l) // 2;
        if arr[mid] == x:
            return mid
        elif arr[mid] < x:
            l = mid + 1
        else:
            r = mid - 1
    return -1

def prime(n): #array of prime numbers
    arr = [1]*(n+1)
    arr[0] = arr[1] = 0
    p=2
    while p*p<=n:
        if arr[p]:
            for i in range(p * 2, n + 1, p):
                arr[i] = 0
            p+=1

    return arr

def prime(n):
    # Returns  a list of primes < n
    sieve = [True] * n
    for i in range(3,int(n**0.5)+1,2):
        if sieve[i]:
            sieve[i*i::2*i]=[False]*((n-i*i-1)//(2*i)+1)
    return [2] + [i for i in range(3,n,2) if sieve[i]]

def palindrome(string,start,end):
    if start==end:
        return True
    if end==1:
        return True
    return string[start]==string[end-1] and palindrome(string,start+1,end-1)

def binomialCoeff(n, k):

    C = [0 for i in range(k+1)]
    C[0] = 1

    for i in range(1, n+1):

        j = min(i, k)
        while (j > 0):
            C[j] = C[j] + C[j-1]
            j -= 1

    return C[k]

def binary_search(array):

    def condition(value) -> bool:
        pass

    left, right = min(search_space), max(search_space) # could be [0, n], [1, n] etc. Depends on problem
    while left < right:
        mid = left + (right - left) // 2
        if condition(mid):
            right = mid
        else:
            left = mid + 1
    return left

prime_dict = {'a': 2, 'b': 3, 'c': 5, 'd': 7, 'e': 11, 'f': 13, 'g': 17, 'h': 19, 'i': 23, 'j': 29, 'k': 31, 'l': 37, 'm': 41, 'n': 43, 'o': 47, 'p': 53, 'q': 59, 'r': 61, 's': 67, 't': 71, 'u': 73, 'v': 79, 'w': 83, 'x': 89, 'y': 97, 'z': 101}

"""

#----# My Functions

inf = float("inf")
mod = 10**9+7
noyes = ["NO","YES"]
yesno = ["YES","NO"]
def aa():
    return int(input())

def bb():
    return list(map(int,input().split()))

def cc():
    s = input()
    return list(s)

def dd():
    return map(int,input().split())

def put(i,val):
    print("Case #",i,":",val)

def swap(arr,i,j):
    arr[i],arr[j] = arr[j],arr[i]

def power(base, exp, mod = mod):
    ans = 1

    while exp:
        lastbit = exp & 1
        if lastbit:
            ans = (ans * base)%(mod)

        base=(base*base)%mod
        exp>>=1

    return ans%mod
#----#

def koi_coding_sikha_do():

    n = aa()
    if n%2==0:
        print(2**n)
    else:
        print(2**n - 1)

onlyone = 0
t=1 if onlyone else int(input())
while(t):

    koi_coding_sikha_do()

    t-=1

"""
__________          __  .__                              __    __             _________
\______   \___.__._/  |_|  |__   ____   ____             \ \   \ \            \_   ___ \     .__         .__
 |     ___<   |  |\   __\  |  \ /  _ \ /    \             \ \   \ \           /    \  \/   __|  |___   __|  |___
 |    |    \___  | |  | |   Y  (  <_> )   |  \            / /   / /           \     \____ /__    __/  /__    __/
 |____|    / ____| |__| |___|  /\____/|___|  /           /_/   /_/             \______  /    |__|        |__|
           \/                \/            \/                                         \/

Unke aakhon me aasu aur chahre pe hasi hai......lagta hai unki lulli unki zip me phasi hai
"""

for i in range(int(input())):
    n=int(input())
    res=[x for x in range(1,2**n+1)]
    while(len(res)!=1):
        x=[]
        for i in range(len(res)-1,0,-2):
            print(res[i],res[i-1])
            if((res[i]+res[i-1])%2==0):
                x.append(max(res[i],res[i-1]))
            else:
                x.append(min(res[i],res[i-1]))
        print(res,x)
        res=x
    print(res[0])

import sys

# Mike change this based on the codeforces problem.
linesPerTest = 1

testArguments = []

i = 0
totalLines = 1

# Read all the lines from stdin, write them to testCasesUnformatted.
while i <= totalLines:
    line = sys.stdin.readline().rstrip('\n')
    if i == 0:
    	totalLines = linesPerTest * int(line)
    else:
        testArguments.append(line)
    i += 1

# Group the test arguments into test cases.
testCases = []
for j in range(0, len(testArguments), linesPerTest):
	testCases.append(testArguments[j:j + linesPerTest])

def f(testArguments):
    n = int(testArguments[0])
    if n == 1:
        return 1
    else:
        return 2**n / 2 - 1

for testCase in testCases:
	print(f(testCase))

n = int(input())
print(2**n-1)
# Wed Apr 20 2022 06:23:32 GMT+0000 (Coordinated Universal Time)

for _ in range(int(input())):
    n = int(input())
    if n % 2 == 0:
        print(2**n)
    else:
        print(2**n-1)

t = int(input())
for i in range(t):
    n = int(input())
    if n%2==1: print(2**n-1)

t = int(input())
for i in range(1,t) :
    x = int(input())
    print(2 ** x - 1)

a= int(input())
for i in range (0,a):
 b= int(input())
 c= 2**b
 print(c)

t = input()
for i in (1,t):
    n = int(input())
    print(2**n-1)

t = int(input())

for i in range(t):
    n = int(input())
    if n % 2 == 0:
        print(n - 1)
    else:
        print(2**n - 1)

def race(a):
    wn=""
    for i in range(1,len(a),2):
        if (a[i-1]+a[i])%2==0:
            wn+=str(a[i])
            wn+=' '
        else:
            wn+=str(a[i-1])
            wn+=' '
    wn=wn.split()
    nwn=[]
    for i in range(len(wn)):
        nwn.append(int(wn[i]))

    return nwn

t=int(input())
n=t**3
a=[]
for i in range(1,n+1):
    a.append(i)

nnl=[]
for i in range(t):
   d=int(input())
   nnl.append(d)

#print(a)
while len(a)>1:
    a=race(a)
print(a[0])

while len(nnl)>1:
    nnl=race(nnl)

print(nnl[0])

n = int(input())
for i in range(n):
    x = int(input())-1
    print(2 ** x)
# Wed Apr 20 2022 06:31:57 GMT+0000 (Coordinated Universal Time)

n=int(input())
for i in range(n):
    m=int(input())
    if(m%2==0):
        print(2**m)
    else:
        print((2**m)-1)

testcases = int(input())

for a in range(testcases) :
    winner = []
    contestant = []
    semiContestant = []
    participant = pow(2,int(input()))

print(participant-1)

t = int(input())
output = 0
for x in range(t):
    n = int(input())
    ans = 0
    m = 1
    for i in range(n):
        ans += m
        m *= 2
print(ans)

from sys import stdin
inp = [*map(int, stdin.read().strip().splitlines())]

for i in range(inp[0]):
    if inp[i] == 1:
        print(1)
    else:
        print((2**inp[1:][i])-1)

from sys import stdin
inp = [*map(int, stdin.read().strip().splitlines())]
atl = inp[1:]

def reduce(atl):
    q = []
    if len(atl) == 1:
        return atl[0]

    for i in range(0, inp[0], 2):
        q.append(max(atl[i], atl[i+1]) if (atl[i] + atl[i+1]) % 2 == 0
                 else min(atl[i], atl[i+1]))

    return reduce(q)

print(reduce(atl))

testcases = int(input())

for a in range(testcases) :
    winner = []
    contestant = []
    semiContestant = []
    participant = pow(2,int(input()))

if participant == 1 :
    print(1)
else :
  print(participant-1)

for _ in range(int(input())):
	n = int(input())
	print(n ** 2 - 1)

from sys import stdin, stdout

t = int(stdin.readline())

"""
range(1,2**n+1)

1,3
5,7  ==> 3,7   => 7,15 => 15
9,11     11,15   (largest) (largest)
13,[15]  (largest)
(largest)

Solution
2. Max(odds)

2**4 -1
"""

for _ in range(t):
    n = int(stdin.readline())
    stdout.write(str(2**n-1))

n=int(input())
print(n**2-1)
# Wed Apr 20 2022 06:23:32 GMT+0000 (Coordinated Universal Time)

def main():
    n = int(input())
    print(2**n-1)

if __name__ == '__main__':
    main()

t = int(input())
while t != 0:
    n = int(input())
    x = pow(n, 2)
    print(x-1)
    t -= 1

t=int(input())
for i in range(t):
    n=int(input())
    print((n**2)-1)

import sys
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))

def solve():
    n=inp()
    print("input ",n)

    prev=0
    for i in range(2,n+1):
        #
        first=prev

        second=first+2**(i-1)
        s=first+second
        if s%2==1:
            # odd
            prev=first
        else:
            prev=second

    return prev
print(solve())

t = int(input())
for i in range(t):
    n = int(input())
    if n%2==1: print(2**n-1)

# -*- coding: utf-8 -*-
"""
Created on Mon Mar 14 19:30:51 2022

@author: Ajay Varma
"""

for i in range(int(input())):
    x= int(input())
    print(2**x)

def play_off(n):
    h=2**n
    k=2
    if n%2==1:
        k=1
    while k!=0:
        h-=1
        k-=1
    return h

t=int(input())
for i in range(t):
    n=int(input())
    print(play_off(n))

import sys;input=sys.stdin.readline
#for single integer inputs
def inp():
    return(int(input()))
#for multiple integer inputs
def invr():
    return(map(int,input().split()))
#for list of integer inputs
def inlt():
    return(list(map(int,input().split())))
#for string inputs
def insr():
    s = input()
    return(list(s[:len(s) - 1]))

#mod = 1e9 + 7 for regular rounds
#mod = 998244353 for educational rounds
def solve():
    pass

for _ in range(int(input())):
    solve()

game_nums = int(input())

for i in range(game_nums):
    g = int(input())
    print(g **2 - 1)

n=int(input())
for i in range(n):
    m=int(input())
    if(m%2==0):
        print(2**m)
    else:
        print((2**m)-1)

t = int(input())
output = 0
for x in range(t):
    n = int(input())
    ans = 0
    m = 1
    for i in range(n):
        ans += m
        m *= 2
print(ans)

t=int(input())
for i in range(t):
    n=int(input())
print("7")
print("1")

for _ in range(int(input())):
    n=int(input())
    a=[]
    for i in range(1, n**2+1):
        a.append(i)
    b=[]
    while len(a)>1:
        for i in range(0,len(a)-1,2):
            if (a[i]+a[i+1])%2==0:
                b.append(a[i+1])
            else:
                b.append(a[i])
        a=b
        b=[]
    print(a[0])

t=int(input())

def win(n):
    if n==1:
        k=1
    else:
        k=(2*n)-1

    return k

for i in range(0,t):
    n=int(input())
    k=win(n)
    print(k)

t = int(input())
for i in range(t):
    n = int(input())
    x = 2^n-1
    print(x)

for _ in range(int(input())):
    n = int(input())
    if n % 2 == 0:
        print(2**(n-1)-1)
    else:
        print(2**n-1)

import sys
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))

def solve(n):
    n=inp()
    print("input ",n)
    prev=0
    for i in range(2,n+1):
        #
        first=prev

        second=first+2**(i-1)
        s=first+second
        if s%2==1:
            # odd
            print( min(first,second))
            return

        print(second)

    return

x = int(input())
y= int(input())
for i in range(x):
    print(2**y-1)

from sys import stdin
inp = [*map(int, stdin.read().strip().splitlines())]

for i in range(inp[0]):
    if i == 1:
        print(1)
    else:
        print((2**inp[1:][i])-1)

t = int(input())

for i in range(t):
    n = int(input())
    if n % 2 == 0:
        print(n - 1)
    else:
        print(2**n - 1)

def main():
	def solve(N):
		return 2**N-1
	while True:
		try:
			N = input()
			print(solve(int(N)))
		except EOFError:
			break

if __name__ == "__main__":
	# Your code goes here
	main()