The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers.

Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office given that a door-plate can hold a number not longer than n digits.


-----Input-----

The only line of input contains one integer n (1 ≤ n ≤ 55) — the maximum length of a number that a door-plate can hold.


-----Output-----

Output one integer — the maximum number of offices, than can have unique lucky numbers not longer than n digits.


-----Examples-----
Input
2

Output
6

Difficulty: EASY
Tags: Combinatorics

Mathematics

Starter code:

Solutions:
n = int(input())
res = pow(2, n + 1)
res = res - 2
print(res)


x = int(input())
ans = 0
for i in range(1, x + 1):
	ans = ans + (1 << i)
print(ans)


x = int(input())
q = 0
for i in range(1, x + 1):
	q = q + pow(2, i)
print(q)


import math

def f():
	x = int(input())
	s = 0
	if x == 1:
		print('2')
		return
	if x == 2:
		print('6')
		return
	while x > 2:
		s += pow(2, x)
		x -= 1
	print(s + 6)
f()


n = int(input())
res = 0
for i in range(1, n + 1):
	res += 2 ** i
print(res)


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


a = int(input())
print(pow(2, a + 1) - 2)


n = int(input())
s = 0
for i in range(1, n + 1):
	s = s + 2 ** i
print(s)


def powerx(a, b):
	if b == 0:
		return 1
	if b % 2 == 1:
		return a * powerx(a * a, b // 2)
	return powerx(a * a, b // 2)
N = int(input())
answer = powerx(2, N + 1) - 2
print(answer)


n = int(input())
k = 2 ** (n + 1) - 2
print(k)


t = int(input())
i = 1
s = 0
while i <= t:
	s += 2 ** i
	i += 1
print(s)


lul = int(input())
t = 0
for i in range(1, lul + 1):
	t += pow(2, i)
print(t)


j = int(input())
print(pow(2, j + 1) - 2)


l = [2, 6, 14, 30, 62, 126, 254, 510, 1022, 2046, 4094, 8190, 16382, 32766, 65534, 131070, 262142, 524286, 1048574, 2097150, 4194302, 8388606, 16777214, 33554430, 67108862, 134217726, 268435454, 536870910, 1073741822, 2147483646, 4294967294, 8589934590, 17179869182, 34359738366, 68719476734, 137438953470, 274877906942, 549755813886, 1099511627774, 2199023255550, 4398046511102, 8796093022206, 17592186044414, 35184372088830, 70368744177662, 140737488355326, 281474976710654, 562949953421310, 1125899906842622, 2251799813685246, 4503599627370494, 9007199254740990, 18014398509481982, 36028797018963966, 72057594037927934]
print(l[int(input()) - 1])


n = int(input())
q = 0
for i in range(1, n + 1):
	q += 2 ** i
print(q)


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


import sys
import datetime

def main():
	n = int(input())
	ans = 0
	for i in range(1, n + 1):
		ans += 2 ** i
	print(ans)
main()


n = int(input())
print(sum([2 ** k for k in range(1, n + 1)]))


n = int(input())
print(sum((2 ** (i + 1) for i in range(n))))


value = input()
value = int(value)
sum = 0
while value > 0:
	sum = sum + 2 ** value
	value -= 1
print(sum)


import math
n = int(input())
m = 0
for i in range(1, n + 1):
	m += pow(2, i)
print(m)


n = int(input())
c = 0
for i in range(1, n + 1):
	c += 2 ** i
print(c)


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


import math, sys
from collections import defaultdict, Counter, deque
INF = float('inf')
MOD = int(1000000000.0) + 7

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def isPrime(n):
	if n <= 1:
		return False
	i = 2
	while i ** 2 <= n:
		if n % i == 0:
			return False
		i += 1
	return True

def primeFactors(n):
	factors = defaultdict(int)
	i = 2
	while i ** 2 <= n:
		while n % i == 0:
			factors[i] += 1
			n //= i
		i += 1
	if n > 1:
		factors[n] += 1
	return factors

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

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

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


n = int(input())
arr = [1]
for x in range(n):
	arr.append(arr[-1] * 2)
print(sum(arr[1:]))


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

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

def li():
	return list(mi())

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
mod = 1000000007
for i in range(1):
	n = ii()
	ans = 0
	for i in range(1, n + 1):
		ans += pow(2, i)
	print(ans)


import io
import sys
n = int(sys.stdin.readline().strip())
a = 2
r = 0
for i in range(0, n):
	r = r + a
	a = a * 2
print(r)


print(int((int(input()) + 1) * '1', 2) - 1)


import math
n = int(input())
res = int(math.pow(2, n + 1)) - 2
print('%d' % res)


import os, sys, pdb
import time, calendar, datetime
import math, itertools
import operator as op
from functools import reduce

def ncr(n, r):
	r = min(r, n - r)
	numer = reduce(op.mul, range(n, n - r, -1), 1)
	denom = reduce(op.mul, range(1, r + 1), 1)
	return numer // denom
(n,) = list(map(int, input().split()))
print(2 ** (n + 1) - 2)


n = int(input())
print(str(2 ** (n + 1) - 2))


n = int(input().strip())
print(pow(2, n + 1) - 2)


n = int(input())
k = 0
for i in range(1, n + 1):
	k += 2 ** i
print(k)


n = int(input())
start = 0
possibilities = 0
while start < n:
	possibilities += 2 ** (start + 1)
	start += 1
print(possibilities)


import sys
input = sys.stdin.readline
res = 0
for i in range(1, int(input()) + 1):
	res += 2 ** i
print(res)


digitos = int(input())
soma = 2 * (2 ** digitos - 1)
print(soma)


num = int(input())
print(2 ** (num + 1) - 2)


from math import pow
n = int(input())
res = 0
while n >= 1:
	res += 2 ** n
	n -= 1
print(res)


n = int(input())
m = 0
for x in range(1, n + 1):
	m += 2 ** x
print(m)


number_length = int(input())
result = 0
for power in range(1, number_length + 1):
	result += 2 ** power
print(result)


n = int(input())
x = 0
for i in range(1, n + 1):
	x += 2 ** i
print(x)


q = int(input())
w = 0
for i in range(1, q + 1):
	w += 2 ** i
print(w)


def iter_pow(x, n):
	res = 1
	while n:
		if n & 1:
			res = res * x
		x = x * x
		n = n >> 1
	return res
n = int(input())
print(2 * (iter_pow(2, n) - 1))


n = int(input())
ans = 0
while n > 0:
	ans += 2 ** n
	n -= 1
print(ans)


n = int(input())
sum = 0
for x in range(1, n + 1):
	sum += pow(2, x)
print(sum)


import itertools
n = int(input())
print((1 << n + 1) - 2)


def main():
	n = int(input())
	tmp = 0
	for i in range(n):
		tmp += 2 ** (i + 1)
	print(tmp)
main()


l = [0]
for i in range(56):
	l.append(2 ** (i + 1) + l[-1])
print(l[int(input())])


import sys
input = lambda : sys.stdin.readline()
int_arr = lambda : list(map(int, input().split()))
str_arr = lambda : list(map(str, input().split()))
get_str = lambda : map(str, input().split())
get_int = lambda : map(int, input().split())
get_flo = lambda : map(float, input().split())
mod = 1000000007
pre = [1 << i for i in range(1, 56)]
for i in range(1, len(pre)):
	pre[i] = pre[i - 1] + pre[i]
n = int(input())
print(pre[n - 1])


n = int(input(''))
print(2 * 2 ** n - 2)


def getChances(n):
	if n == 1:
		return 2
	return 2 ** n + getChances(n - 1)
n = int(input())
total = getChances(n)
print(total)


n = int(input())
s = 0
for k in range(1, n + 1):
	s += 2 ** k
print(s)


import sys
import math
import collections
inp = lambda : sys.stdin.readline()
x = int(inp())
print(2 ** (x + 1) - 2)


def main():
	n = int(input())
	print(solver(n))

def solver(n):
	return pow(2, n + 1) - 2
main()


n = int(input())
ans = 0
for x in range(1, n + 1):
	ans = ans + 2 ** x
print(ans)


n = int(input())
X = []
print(2 * (2 ** n - 1))


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

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

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def solve():
	n = int(inp())
	print(2 ** (n + 1) - 2)
testcase(1)


n = int(input())
summ = 0
for i in range(1, n + 1):
	summ += 2 ** i
print(summ)


n = int(input())
print(int('1' * n + '0', 2))


n = int(input())
qtd_perm = pow(2, n + 1) - 2
print(qtd_perm)


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


def power(number, pot):
	if pot == 0:
		return 1
	if pot % 2 == 0:
		return power(number * number, pot // 2)
	else:
		return number * power(number, pot - 1)
t = int(input())
ans = 0
for i in range(1, t + 1):
	ans += power(2, i)
print(ans)


n = int(input())
total = sum((2 ** x for x in range(1, n + 1)))
print(total)


import sys
ip = lambda : int(sys.stdin.readline())
arr = lambda : list(map(int, sys.stdin.readline().split(' ')))
arr1 = lambda n: [arr() for _ in range(n)]
n = ip()
print(2 ** (n + 1) - 2)


import math
n = int(input())
ans = 2 * (pow(2, n) - 1)
print(ans)


import math
n = int(input())
s = 0
for i in range(1, n + 1):
	k = 1
	for j in range(i):
		k = k * 2
	s += k
print(s)


n = int(input())
ans = 0
mult = 1
for i in range(1, n + 1):
	mult *= 2
	ans += mult
print(ans)


import math
n = int(input())
print(2 ** (n + 1) - 2)


t = int(input())
ans = 2 * (pow(2, t) - 1)
print(ans)


lista = [0] * 56
for i in range(1, 56):
	lista[i] = 2 ** i + lista[i - 1]
numero = int(input())
print(lista[numero])


n = int(input())
k = 0
for c in range(1, n + 1):
	if c == 1:
		k += 2
		continue
	if c == 2:
		k += 4
		continue
	if c >= 3:
		k += 2 ** c
print(k)


def lucky_n():
	n = int(input())
	if n < 1 or n > 55:
		print('valor invalido')
		lucky_n()
	else:
		for i in range(n + 1):
			a = 2 ** i
			b = a + a
			c = b - 2
		print(c)
lucky_n()


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


s = 0
for _ in range(1, int(input()) + 1):
	s += 2 ** _
print(s)


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


import re, sys, string, operator, functools, fractions, collections
sys.setrecursionlimit(10 ** 7)
dX = [-1, 1, 0, 0, -1, 1, -1, 1]
dY = [0, 0, -1, 1, 1, -1, -1, 1]
RI = lambda x=' ': list(map(int, input().split(x)))
RS = lambda x=' ': input().rstrip().split(x)
mod = int(1000000000.0 + 7)
eps = 1e-06
n = RI()[0]
print(pow(2, n + 1) - 2)


N = int(input())
print(2 ** (N + 1) - 2)


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


n = int(input().strip())
total = 0
while n:
	total += 2 ** n
	n -= 1
print(total)


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


b = int(input())
soma = 2
aux = 2
for i in range(2, b + 1):
	aux *= 2
	soma += aux
print(soma)


n = int(input())

def foo(n):
	ans = 0
	for i in range(n):
		ans += 2 ** (i + 1)
	return ans
print(foo(n))


x = int(input())
sum = 0
for i in range(1, x + 1):
	sum += 2 ** i
print(sum)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [tuple(map(int, l.split())) for l in sys.stdin]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	return 2 ** (n + 1) - 2
print(main())


n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 1 << i
print(ans)


inp = int(input())
count = 0
for i in range(1, inp + 1):
	count += pow(2, i)
print(count)


n = int(input())

def subsets(x):
	if x == 1:
		return 2
	else:
		ans = subsets(x - 1)
		ans += pow(2, x)
		return ans
print(subsets(n))


total_offices = 0
for degree in range(1, int(input()) + 1):
	total_offices += pow(2, degree)
print(total_offices)


total = 0
f = int(input())
while f:
	total += 2 ** f
	f -= 1
print(total)


3
n = int(input())
ans = 2 ** (n + 1) - 2
print(str(ans))


import sys
input = sys.stdin.readline

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


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


n = int(input())
d = 2
num = 0
for i in range(n):
	num = num + d
	d = d * 2
print(num)


x = int(input())
y = 1
z = 0
while y <= x:
	z += 2 ** y
	y += 1
print(z)


def main(n):
	ret = 0
	for i in range(1, n + 1):
		ret += 2 ** i
	return ret
print(main(int(input())))


import math

def fact(n):
	ans = 1
	for i in range(2, n + 1):
		ans *= i
	return ans

def comb(n, c):
	return fact(n) // (fact(n - c) * c)
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 2 ** i
print(ans)


from sys import stdin, stderr
print(2 ** (int(input()) + 1) - 2)


from sys import stdin, stdout
from gc import disable

def main() -> int:
	disable()
	n = int(stdin.readline())
	ans = 0
	for i in range(1, n + 1):
		ans += 1 << i
	stdout.write('%i' % ans)
	return 0
main()


n = int(input())
s = 2 ** (n + 1)
print(s - 2)


x = int(input())
print(2 ** (x + 1) - 2)


from collections import Counter
n = int(input())
print(2 ** (n + 1) - 2)


n = int(input())
cnt = 0
while n > 1:
	cnt += 2 ** n
	n -= 1
print(cnt + 2)


def pro(n):
	ans = 0
	k = 2
	while n:
		ans += k
		k *= 2
		n -= 1
	print(ans)
pro(int(input()))


n = int(input())
results = 0
for c in range(1, n + 1):
	results += 2 ** c
print(results)


a = int(input())
ans = 2 * (2 ** a - 1)
print(ans)


n = int(input())
l = [0] * n
tp = 2
for i in range(n):
	l[i] = tp
	tp *= 2
	if i > 0:
		l[i] += l[i - 1]
print(l[n - 1])


print(pow(2, int(input())) * 2 - 2)


n = int(input())
sum = 2 ** (n + 1) - 2
print(sum)


def result(n):
	return 2 ** (n + 1) - 2
n = int(input())
print('%d' % result(n))


import sys
n = int(input())
ans = 0
for i in range(1, n + 1):
	ans += 2 ** i
print(ans)


n = int(input())
print(sum([2 ** a for a in range(1, n + 1)]))


def f(l):
	return 2 ** (n + 1) - 2
n = int(input())
print(f(n))


n = int(input())
somme = 0
for i in range(1, n + 1):
	somme += 2 ** i
print(somme)


digits = 0
answer = 0
digits = int(input())
for i in range(1, digits + 1):
	if i % 2 == 0:
		answer += pow(2, int(i / 2)) * pow(2, int(i / 2))
	else:
		answer += pow(2, int(i / 2)) * pow(2, 1 + int(i / 2))
print(answer)


from sys import stdin, stdout
n = int(stdin.readline())
ans = 0
for i in range(1, n + 1):
	ans += pow(2, i)
stdout.write(str(ans) + '\n')


n = int(input(''))
tot = 0
for i in range(1, n + 1):
	tot += 2 ** i
print(tot)


def main():
	n = int(input())
	(t, c) = (0, 1)
	for i in range(1, n + 1):
		c *= 2
		t += c
	print(t)
main()


n = int(input())
final = 0
for i in range(1, n + 1):
	final += pow(2, i)
print(final)


a = int(input())
b = 2 ** (a + 1) - 2
print(b)


a = int(input())
soma = 2
aux = 2
for i in range(2, a + 1):
	aux *= 2
	soma += aux
print(soma)


m = int(input())
sumi = 0
for i in range(1, m + 1):
	sumi += 2 ** i
print(sumi)


import sys
n = int(sys.stdin.readline())
print(2 ** (n + 1) - 2)


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


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


n = int(input())

def risultato(n):
	if n == 1:
		return 2
	else:
		return 2 ** n + risultato(n - 1)
print(risultato(n))


n = int(input())
dp = [0] * (n + 1)
dp[1] = 2
for i in range(2, n + 1):
	dp[i] = dp[i - 1] + 2 ** i
print(dp[n])


import collections
import math
ans = [2]
for i in range(2, 56):
	ans.append(ans[-1] + 2 ** i)
n = int(input())
print(ans[n - 1])


n = int(input())
su = 0
for i in range(1, n + 1):
	su += 2 ** i
print(su)


from math import factorial as f
n = int(input())
ans = 0
for digits in range(1, n + 1):
	for i in range(0, digits + 1):
		sevens = i
		eights = digits - i
		t = f(digits) // (f(sevens) * f(eights))
		ans += t
print(ans)


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


n = int(input())
result = 0
i = 1
while i <= n:
	result = result + pow(2, i)
	i = i + 1
print(result)


from sys import stdin

def main():
	n = int(stdin.readline())
	ans = 0
	for i in range(1, n + 1):
		ans += 1 << i
	print(ans)
main()


import math
n = int(input())
x = 0
for i in range(1, n + 1):
	x += int(math.ceil(2 ** i))
print(x)


slen = int(input())
noff = 0
while slen > 0:
	noff += 2 ** slen
	slen -= 1
print(noff)


import math
n = int(input())
luckyNums = 0
while n != 0:
	luckyNums += int(math.pow(2, n))
	n -= 1
print(luckyNums)


n = int(input())
sum = 0
prod = 1
for i in range(n):
	prod = prod * 2
	sum += prod
print(sum)


x = int(input())
res = 0
count = 1
for i in range(0, x):
	res += 2 ** count
	count += 1
print(res)


n = int(input())
a = [int(pow(2, x)) for x in range(1, n + 1)]
c = []
for i in range(len(a)):
	c.append(sum(a[:i + 1]))
print(c[n - 1])


n = int(input())
S = 0
for i in range(1, 1 + n):
	S = S + 2 ** i
print(S)


maxn = int(input())
answer = 0
for i in range(maxn):
	a = 1
	for j in range(i + 1):
		a = a * 2
	answer += a
print(answer)


import math
a = int(input())
s = 0
i = 1
while i <= a:
	s = s + 2 ** i
	i = i + 1
print(s)


from sys import stdin

def iinput():
	return int(stdin.readline())

def minput():
	return map(int, stdin.readline().split())

def linput():
	return list(map(int, stdin.readline().split()))
n = iinput()
sum = (1 << n + 1) - 2
print(sum)


from sys import stdin, stdout
from collections import Counter
st = lambda : list(stdin.readline().strip())
li = lambda : list(map(int, stdin.readline().split()))
mp = lambda : map(int, stdin.readline().split())
inp = lambda : int(stdin.readline())
pr = lambda n: stdout.write(str(n) + '\n')
mod = 1000000007

def solve():
	n = inp()
	ans = 0
	for i in range(1, n + 1):
		ans += pow(2, i)
	pr(ans)
for _ in range(1):
	solve()


import sys
n = int(input())
print((2 << n) - 2)


def powr(a, b):
	res = 1
	while b > 0:
		if b & 1:
			res *= a
		a *= a
		b >>= 1
	return res
print(powr(2, int(input()) + 1) - 2)


n = int(input())
s = 0
for x in range(1, n + 1):
	s += 2 ** x
print(s)


import math
exponent = int(input())
i = 1
sum = 0
while i <= exponent:
	sum += int(math.pow(2, i))
	i += 1
print(sum)


n = int(input())
sum = 0
for i in range(1, n + 1):
	sum += 1 << i
print(sum)


n = int(input())
ans = 2 * (2 ** n - 1)
print(ans)


n = int(input())
sum1 = 0
for i in range(1, n + 1):
	sum1 += 2 ** i
print(sum1)


x = int(input())
result = 0
for i in range(x):
	result = result + 2 ** (i + 1)
print(result)


num_digits = int(input())
print(sum((2 ** i for i in range(1, num_digits + 1))))


n = int(input())
print(sum((2 ** y for y in range(1, n + 1))))


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


n = int(input())
s = 0
while n >= 1:
	s += 2 ** n
	n -= 1
print(s)


n = int(input())

def luckyNumbers(n):
	return 2 ** (n + 1) - 2
print(luckyNumbers(n))


from sys import stdin
import operator
import functools
num = int(stdin.readline())
print(2 ** (num + 1) - 2)


n = int(input())
z = 2 ** (n + 1) - 2
print(z)


print(sum((1 << i for i in range(1, int(input()) + 1))))


def rez(sum, num):
	if num == 0:
		return sum
	else:
		sum += 2 ** num
		return rez(sum, num - 1)
a = int(input())
print(rez(0, a))


def main():
	n = int(input())
	inc = 0
	for x in range(1, n + 1):
		inc += 2 ** x
	print(inc)
main()


a = int(input())
s = 2 * (2 ** a - 1)
print(s)


a = int(input())
sum1 = 0
for i in range(1, a + 1):
	sum1 += 2 ** i
print(sum1)


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


import math
k = int(input())
l = 0
for a in range(k):
	l += 2 ** (a + 1)
print(l)


import sys
a = sys.stdin.readline()
print(2 ** (int(a) + 1) - 2)


n = int(input())
p = 2
ans = 0
for i in range(n):
	ans += p
	p *= 2
print(ans)


n = int(input())
l = [8] * n
ans = 0
for i in l:
	ans = 2 * ans + 2
print(ans)


num = int(input())
asw = 0
for i in range(1, num + 1):
	asw += pow(2, i)
print(asw)


def f(x):
	if x == 1:
		return 2
	else:
		return 2 ** x + f(x - 1)
n = int(input())
print(f(n))


n = int(input())
(res, p) = (0, 2)
for j in range(n):
	res += p
	p *= 2
print(res)


n = int(input())
if n == 1:
	print(2)
else:
	x = [0] * n
	x[0] = 2
	for i in range(1, n):
		x[i] = x[i - 1] * 2
	print(sum(x))


from sys import stdin

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline()
n = ii()
(m, s) = (1, 0)
for i in range(n):
	p = 2
	s += m * p
	m *= 2
print(s)


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


import re
n = int(input())
print(int(2 ** (n + 1) - 2))


i = 1
n = eval(input())
s = 0
while i <= n:
	s = s + 2 ** i
	i = i + 1
print(s)


n = int(input())
s = n + 1
f = 2 ** s
c = f - 2
print(c)


n = int(input())
k = 2
o = 0
for i in range(n):
	o += k
	k *= 2
print(o)


n = int(input())

def f(n):
	if n == 0:
		return 0
	return 2 ** n + f(n - 1)
print(f(n))


from collections import deque
from math import log

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def li():
	return list(mi())
n = ii()
s = 0
for i in range(1, n + 1):
	for j in range(i + 1):
		x = max(j, i - j)
		y = min(j, i - j)
		s1 = 1
		for k in range(i - x):
			s1 *= i - k
		for k in range(1, y + 1):
			s1 //= k
		s += s1
print(s)


n = int(input())
x = pow(2, n)
print(2 * (x - 1))


c = 2
n = int(input())
for i in range(2, n + 1):
	c += pow(2, i, 100000000000000000000009)
print(c)


n = int(input())
answer = 0
nextpower = 2
for i in range(n):
	answer += nextpower
	nextpower *= 2
print(answer)


a = 1
t = int(input())
s = 0
for i in range(1, t + 1):
	a = 2 * a
	s += a
print(s)


n = int(input())
r = 2 ** n * 2 - 2
print(r)


def potencia(x, y):
	res = 1
	while y > 0:
		if y % 2 == 1:
			res = res * x
		y = y // 2
		x = x * x
	return res
n = int(input())
ans = potencia(2, n + 1) - 2
print(ans)


n = int(input())
anz = 0
for i in range(1, n + 1):
	anz += 2 ** i
print(anz)


n = int(input())
s = [2 ** x for x in range(56)]
ans = 0
for i in range(1, n + 1):
	ans += s[i]
print(ans)


from sys import stdin, stdout
from math import gcd, ceil, sqrt
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
mod = 1000000007
n = ii1()
res = 0
for i in range(1, n + 1):
	res += pow(2, i)
print(res)


a = int(input())
print(sum([2 * 2 ** i for i in range(a)]))


from math import *
n = int(input())
print((2 << n) - 2)


n = int(input())
i = 1
a = 0
while i <= n:
	a += 1 << i
	i += 1
print(a)


x = int(input())
Sum = 0
while x > 0:
	y = 2 ** x
	Sum = Sum + y
	x = x - 1
print(Sum)


n = int(input())

def lucky(n):
	if n == 1:
		return 2
	elif n == 0:
		return 0
	else:
		luck = lucky(n - 1) + 2 ** n
		return luck
print(lucky(n))


n = int(input())
k = 0
while n != 0:
	k += 2 ** n
	n -= 1
print(k)


n = int(input())
s = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968]
ans = sum(s[:n])
print(ans)


import bisect
import os
import gc
import sys
from io import BytesIO, IOBase
from collections import Counter
from collections import deque
import heapq
import math
import statistics

def sin():
	return input()

def ain():
	return list(map(int, sin().split()))

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

def iin():
	return int(sin())
MAX = float('inf')
MIN = float('-inf')
MOD = 1000000007

def readTree(n, m):
	adj = [deque([]) for _ in range(n + 1)]
	for _ in range(m):
		(u, v) = ain()
		adj[u].append(v)
		adj[v].append(u)
	return adj

def main():
	n = iin()
	s = 0
	for i in range(1, n + 1):
		s += 2 ** i
	print(s)
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')
main()


n = int(input())
a = 2 * (2 ** n - 1)
print(a)


n = int(input())
m = 2 ** (n + 1) - 2
print(m)


n = int(input())
res = 0
for cnt_positions in range(1, n + 1):
	res += 2 ** cnt_positions
print(res)


length = int(input())
print(pow(2, length + 1) - 2)


n = int(input())
print((1 << n) - 1 << 1)


n = int(input())
cnt = 0
for i in range(1, n + 1):
	cnt += 1 << i
print(cnt)


n = int(input())
total = 0
for i in range(1, n + 1):
	total += 2 ** i
print(total)


import math, sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
li = lambda : list(map(int, input().split()))

def solve():
	n = int(input())
	ans = 0
	for i in range(n):
		ans += 2 ** (i + 1)
	print(ans)
for _ in range(1):
	solve()


def happy_cabinets(number):
	return 2 ** (number + 1) - 2
print(happy_cabinets(int(input())))


import sys
input = sys.stdin.readline

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

def float_compare(a, b):
	if abs(a - b) < float(1e-09):
		return True
	else:
		return False

def sub_mod(x, mod):
	x = x % mod
	if x < 0:
		x += mod
	return x

def divisor(n):
	i = 1
	dv = []
	while i * i <= n:
		if n % i == 0:
			dv.append(i)
			if i * i != n:
				dv.append(n // i)
		i += 1
	return dv
n = int(input().strip())
ans = 0
for i in range(1, n + 1):
	ans += 2 ** i
print(ans)


n = int(input())
a = 0
for x in range(1, n + 1):
	a += 2 ** x
print(a)


n = int(input())
arr = [0] * 55
arr[0] = 2
for i in range(1, 55):
	arr[i] = arr[i - 1] * 2
for i in range(1, 55):
	arr[i] = arr[i - 1] + arr[i]
print(arr[n - 1])


n = int(input())
i = 2 ** (n + 1) - 2
print(i)


ans = 0
for i in range(1, int(input()) + 1):
	ans += 2 ** i
print(ans)


F = lambda : int(input())
sum = 0
for i in range(1, F() + 1):
	sum += pow(2, i)
print(sum)


import sys
import io
import os
total = 0
failed = 0

def run(test, res):
	x = io.StringIO()
	with io.StringIO(test) as sys.stdin:
		with x as sys.stdout:
			work()
			z = x.getvalue().strip()
	sys.stdout = sys.__stdout__
	print('Passed?', z == res)
	print('Expected: ', res)
	print('Actual  : ', z)
	global total, failed
	total += 1
	failed += 1 if z != res else 0

def work():
	n = int(input())
	c = 0
	for l in range(1, n + 1):
		c += 2 ** l
	print(c)

def test():
	run('2', '6')
if 'LOCALTEST' in os.environ:
	test()
	print('\n Result: %s (%d total, %d failed)' % ('FAILED' if failed > 0 else 'PASSED', total, failed))
else:
	work()


n = int(input())
foo = 0
for i in range(1, n + 1):
	foo += 2 ** i
print(foo)


number = int(input())
if number >= 1 and number <= 55:
	luckynumber = 2 ** number * 2
	print(int(luckynumber - 2))
else:
	print('nel')


N = int(input())
ans = 0
for i in range(1, N + 1):
	ans += 1 << i
print(ans)


n = int(input())
ret = 0
for a in range(1, n + 1):
	ret += 2 ** a
print(ret)


import sys
import math

def main():
	n = int(sys.stdin.readline().strip())
	print(2 ** (n + 1) - 2)
main()


a = int(input())
total = 2 ** (a + 1)
total -= 2
print(total)


n = int(input())
contador = 0
i = 1
while i <= n:
	contador = contador + 2 ** i
	i = i + 1
print(contador)


x = int(input())
num = 0
l = 2
while x > 0:
	num = num + l
	l = l * 2
	x -= 1
print(num)


dlug = int(input())
pop_pot = 1
wynik = 0
for x in range(dlug):
	pop_pot *= 2
	wynik += pop_pot
print(wynik)


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


ans = 2
for _ in range(1, int(input())):
	ans *= 2
	ans += 2
print(ans)


import sys

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


cin = int(input())
print(2 ** (cin + 1) - 2)


import sys
input = sys.stdin.readline
ins = lambda : input().rstrip()
ini = lambda : int(input().rstrip())
inm = lambda : map(int, input().rstrip().split())
inl = lambda : list(map(int, input().split()))
out = lambda x: print('\n'.join(map(str, x)))
n = ini() + 1
print(2 ** n - 2)


n = int(input())
f = 0
for i in range(1, n + 1):
	f += 2 ** i
print(f)


def lucky(n):
	v = 0
	for i in range(1, n + 1):
		v += 2 ** i
	return v
n = input()
print(lucky(int(n)))


num = input()
num = int(num)
total1 = 0

def ways(n, total):
	if n == 0:
		return total
	total += 2 ** n
	return ways(n - 1, total)
print(ways(num, total1))


n = int(input())
st = 1
an = 0
for i in range(n):
	st *= 2
	an += st
print(an)


n = int(input())
count = 0
for q in range(1, n + 1):
	count += 2 ** q
print(count)


from math import factorial
n = int(input())
a = 0
for i in range(1, n + 1):
	for j in range(0, i + 1):
		a += int(factorial(i) / (factorial(j) * factorial(i - j)))
print(a)


n = int(input())
m = 0
for i in range(1, n + 1):
	m += 2 ** i
print(m)


import sys

def input_int():
	return int(sys.stdin.readline())
n = input_int()
possibilities = 0
for i in range(1, n + 1):
	possibilities = possibilities + 2 ** i
print(possibilities)


n = int(input())
rz = -2 * (1 - 2 ** n)
print(rz)


i = 1

def solve(n, i):
	if n == 0:
		return 0
	return pow(2, i) + solve(n - 1, i + 1)
n = int(input())
print(solve(n, i))


import math
import re
n = int(input())
print(pow(2, n + 1) - 2)


n = int(input())
ans = 0
curr = 2
for i in range(n):
	ans += curr
	curr *= 2
print(ans)


N = int(input())
sol = 0
for n in range(1, N + 1):
	sol += 2 ** n
print(sol)


n = eval(input())
print(2 ** (n + 1) - 2)


def calc(n):
	if n == 1:
		return 2
	return 2 ** n + calc(n - 1)
n = int(input())
print(calc(n))


n = int(input())
count = 0
for val in range(1, n + 1):
	count += 2 ** val
print(count)


import itertools, functools, math

def solve():
	n = int(input())
	r = 0
	for i in range(1, n + 1):
		r += 2 ** i
	return r
print(solve())


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


def ordered_arrangements(n, p):
	return 2 ** p

def factorial(n):
	if n <= 1:
		return 1
	return n * factorial(n - 1)

def main():
	num_digits = int(input())
	total = 0
	for i in range(1, num_digits + 1):
		total += ordered_arrangements(i * 2, i)
	print(total)
	return
main()


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from itertools import *
import bisect
from heapq import *
from math import *
from copy import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
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')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
from types import GeneratorType

def iterative(f, stack=[]):

	def wrapped_func(*args, **kwargs):
		if stack:
			return f(*args, **kwargs)
		to = f(*args, **kwargs)
		while True:
			if type(to) is GeneratorType:
				stack.append(to)
				to = next(to)
				continue
			stack.pop()
			if not stack:
				break
			to = stack[-1].send(to)
		return to
	return wrapped_func
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def integer():
	return int(inp())

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')
from functools import reduce

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

def solve():
	n = int(inp())
	s = 0
	for i in range(1, n + 1):
		s += 2 ** i
	print(s)
solve()


n = int(input())
prd = [2]
for i in range(1, n):
	prd.append(prd[len(prd) - 1] + 2 ** (i + 1))
print(prd[len(prd) - 1])


n = int(input())
mPow = 1
mSum = 0
for i in range(n):
	mPow = mPow * 2
	mSum += mPow
print(mSum)


a = int(input())
su = 0
for i in range(1, a + 1):
	su += 2 ** i
print(su)


ll = lambda : map(int, input().split())
t = lambda : int(input())
ss = lambda : input()
lx = lambda x: map(int, input().split(x))

def f():
	n = t()
	s = 0
	for i in range(1, n + 1):
		s += 2 ** i
	print(s)
f()


def numLuckiesWithLength(n):
	assert 1 <= n <= 55
	return 2 ** n

def numLuckiesWithLengthAtMost(n):
	return sum((numLuckiesWithLength(i) for i in range(1, n + 1)))
n = int(input())
print(numLuckiesWithLengthAtMost(n))


n = int(input())
pot = 2 ** n
print(pot + pot - 2)


n = int(input())
a = 2
r = 2
s = a * (r ** n - 1) // (r - 1)
print(s)


n = 56
lista = [1] * n
lista[0] = 0
lista[1] = 2
for i in range(2, n):
	lista[i] = lista[i - 1] + 2 ** i
dig = int(input())
print(lista[dig])


def rec(n):
	if n == 1:
		return 2
	return rec(n - 1) + 2 ** n

def main():
	numb = int(input())
	if numb < 1 or numb > 55:
		return 0
	print(rec(numb))
	return
main()


n = int(input())
count = 0
for i in range(1, n + 1):
	count = count + 2 ** i
print(count)


m = int(input())
y = 0
if m > 1:
	for x in range(1, m + 1):
		y += 2 ** x
	print(y)
else:
	print(2)


Sum = 0
for i in range(int(input())):
	Sum = Sum * 2 + 2
print(Sum)


a = int(input())
out = 0
for x in range(0, a):
	out += pow(2, x + 1)
print(out)


n = int(input())
c_e = 1
c_s = 0
for i in range(1, n + 1):
	c_s += c_e * 2
	c_e *= 2
print(c_s)


import math

def comb(x):
	if x == 1:
		return 2
	else:
		return comb(x - 1) + 2 ** x
a = int(input())
print(comb(a))


n = int(input())
x = 2
s = 0
for i in range(n):
	s += x
	x = 2 * x
print(s)


import time
n = int(input())
start = time.time()
print(2 ** (n + 1) - 2)
finish = time.time()


n = int(input())
total = 0
for x in range(n):
	total += 2 ** (n - x)
print(total)


import sys
input = sys.stdin.readline

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

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

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

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

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

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

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
from bisect import bisect_left

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


length = int(input())
result = 2
for i in range(2, length + 1):
	result = result * 2 + 2
print(result)


n = int(input())
if n < 1 or n > 55:
	print('No valido')
else:
	for i in range(n + 1):
		R = 2 ** n * 2
	print(int(R - 2))


from math import *
x = int(input())
n = 0
summ = 0
for i in range(x):
	res = int(pow(2, n + 1))
	n = n + 1
	summ = summ + res
print(int(summ))


a = int(input())
y = 0
for x in range(1, a + 1):
	y += 2 ** x
print(y)


def read_int():
	return int(input())
n = read_int()
result = 0
for i in range(n, 0, -1):
	result += 1 << i
print(result)


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


n = int(input())
result = 2 * (2 ** n - 1)
print(result)


t = int(input())
T = 0
while t > 0:
	T += pow(2, t)
	t -= 1
print(T)


ans = 0
n = int(input())
k = 1
for _ in range(n):
	k *= 2
	ans += k
print(ans)