To quickly hire highly skilled specialists one of the new IT City companies made an unprecedented move. Every employee was granted a car, and an employee can choose one of four different car makes.

The parking lot before the office consists of one line of (2n - 2) parking spaces. Unfortunately the total number of cars is greater than the parking lot capacity. Furthermore even amount of cars of each make is greater than the amount of parking spaces! That's why there are no free spaces on the parking lot ever.

Looking on the straight line of cars the company CEO thought that parking lot would be more beautiful if it contained exactly n successive cars of the same make. Help the CEO determine the number of ways to fill the parking lot this way.


-----Input-----

The only line of the input contains one integer n (3 ≤ n ≤ 30) — the amount of successive cars of the same make.


-----Output-----

Output one integer — the number of ways to fill the parking lot by cars of four makes using the described way.


-----Examples-----
Input
3

Output
24


-----Note-----

Let's denote car makes in the following way: A — Aston Martin, B —   Bentley, M — Mercedes-Maybach, Z — Zaporozhets. For n = 3 there are the following appropriate ways to fill the parking lot: AAAB AAAM AAAZ ABBB AMMM AZZZ BBBA BBBM BBBZ BAAA BMMM BZZZ MMMA MMMB MMMZ MAAA MBBB MZZZ ZZZA ZZZB ZZZM ZAAA ZBBB ZMMM

Originally it was planned to grant sport cars of Ferrari, Lamborghini, Maserati and Bugatti makes but this idea was renounced because it is impossible to drive these cars having small road clearance on the worn-down roads of IT City.

Difficulty: interview

Starter code:

Solutions:
n = int(input())
print(4 * ((n - 3) * 3 * 3 * 4 ** max(0, n - 4) + 2 * 3 * 4 ** (n - 3)))


from functools import reduce
from math import factorial
n = int(input())
print(int((n-3)*4*9*4**(n-4) + 2*4*3*4**(n-3)))


import sys
def fact(n):
	ret = 1
	for x in range(1, n + 1):
		ret = ret * x
	return ret

def C(n, k):
	return fact(n) // (fact(k) * (fact(n - k)))

def get(n):
	if n == 0:
		return 1
	if n == 1:
		return 3
	return 3 * 4 ** (n - 1)

n = int(input())
ret = 0
ans = 0
for x in range(n - 2 + 1):
	right = n - 2 - x
	left = x
	ans += 4 * get(left) * get(right)
print(ans)

n = int(input())
ans = 0
cnt = 2 * n - 2
ans += (n - 3) * 4 * 3 * 3 * (4**(cnt - n - 2))
ans += (4 * 3 * (4**(cnt - n - 1))) * 2
print(int(ans))

n = int(input())
tot = 2 * n - 2
ans = 0
for i in range(tot - n + 1):
  p = 4
  l = 1 + i
  if l > 1: p = p * 3
  for j in range(100):
    if 1 + j < l - 1: p = p * 4
  if l + n - 1 < tot: p = p * 3
  for j in range(100):
    if tot - j > l + n: p = p * 4
  ans = ans + p
print(ans)

n = int(input())

a = 3*4**(2*n-2-n-1)
b = 9*4**(2*n-2-n-2)

print(int(2*a + b*(n-3))*4)

ans = 0

n = int(input())

for i in range(1,n):
    p = 2*n-2-i-n+1
    q = i-1

    if p >= 1:
        p = 3 * (4**(p-1))
    else:
        p = 1

    if q >= 1:
        q = 3 * (4**(q-1))
    else:
        q = 1

    ans += 4*p*q

print(ans)


n = int(input())
r1 = int((n - 3) * 4 * 9 * 4 ** (2 * n - 2 - n - 2))
r2 = int(2 * 4 * 3 * 4 ** (2 * n - 2 - n - 1))
print(r1 + r2)

from math import factorial

def C(n, k):
	return n - k + 1


n = int(input())
if n != 3:
    print(4 * (C(2 * n - 2, n) - 2) * 3 * 3 * 4 ** (n - 4) + 4 * 2 * 3 * 4 ** (n - 3))
else:
	print(24)


n = int(input())
res = 0
res += 8 * (3 * pow(4, n - 3))
res += ((n - 3) * 4 * 9 * int(pow(4, n - 4)))
print(res)

n = int(input())
print(6 * 4**(n-2) + 9 * (n-3) * 4**(n-3))

n = int(input())
print(4 * (2 * 3 * (4 ** (n - 3)) + (n - 3) * 9 * (4 ** (n - 3)) // 4))

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(1e9+7)
eps=1e-6
#################################################
n=RI()[0]
a=(9*(n-3)+24)*(4**(n-3))
print(a)


import sys

n = int(sys.stdin.readline())
m = (n - 3) * 9 * (4 ** ((2 * n - 2) - (n + 2))) + 2 * 3 * (4 ** ((2 * n - 2) - (n + 1)))

print(int(4 * m))

n = int(input())

l = 2 * n - 2
t = l - n

cur1 = 4**(t) * 3
cur2 = 0
if t >= 2:
	cur2 += 4**(t - 1) * 9

print(cur1 * 2 + (t - 1) * cur2)


import sys


def fact(k):
    return k ** 2 * (k - 1) ** 2 * (k - 2) ** 2 * (k - 3) ** 2 * (k - 4) ** 2


n = int(input())

print(4 ** (n - 3) * 3 * (8 + 3 * (n - 3)))


n = int(input())
ans = int(((n - 3) * 9 * 4 ** (n - 4) + 2 * 3 * 4 ** (n - 3))) * 4
print(ans)


# S = input()
# A = S[0] + S[2] + S[4] + S[3] + S[1]
# N = int(A)
# print((N ** 5) % (10 ** 5), end="")

N = int(input())

sol = 0
i = 0

while i + N - 1 < (2 * N - 2):

    restL = i
    tmp = 1

    if restL >= 1:
        tmp *= 3
        restL -= 1

    if restL >= 0:
        tmp *= 4 ** restL

    restR = (2 * N - 2) - (i + N - 1) - 1

    if restR >= 1:
        tmp *= 3
        restR -= 1

    if restR >= 0:
        tmp *= 4 ** restR

    sol += tmp

    i += 1

print(4 * sol)

n = int(input())
ans = 0
l = 2 * n - 2
for x in range(0, l - n + 1):
    t = 4
    for y in range(0, l):
        if x <= y and y < x + n: continue
        elif y == x - 1 or y == x + n: t *= 3
        else: t *= 4
    ans += t
print(ans)

#*****... 4 * 3 * 4 * 4
#.*****.. 3 * 3 * 4 * 4
#..*****. 3 * 3 * 4 * 4
#...***** 4 * 3 * 4 * 4


n = int(input())

ans = 0
for i in range(n - 1):
    t = 4
    if i > 0:
        t = t * 3 * (4 ** (i - 1))
    if i + 1 < n - 1:
        t = t * 3 * (4 ** (n - i - 2 - 1))

    ans += t

print(ans)

n = int(input())
l = 2 * n - 2
s = 0
k = n
if k < l - 1:
    d1 = (l - (k + 2) + 1) * 9 * 4**(l - 2 - k)
else:
    d1 = 0
d2 = 2 * 3 * 4**(l - 1 - k)
s += d1 + d2
print(s * 4)


n=int(input())
total=2*n-2
if n==3:
    print(24)
else:
    free=total-n-2+1
    ans=0
    ans+=4*2*3*pow(4,total-n-1)
    left=2
   # print(total-n+1)
    while left<total-n+1:
        #print(left)
        ans+=4*3*3*pow(4,left-2)*pow(4,total-left-n)
       # print(str(left-2)+' '+str(total-left-n))
        left+=1
    print(ans)


import math

def choose(n,r):
	return math.factorial(n) // math.factorial(n-r)  // math.factorial(r) 

def choose2(n,r):
	return math.factorial(n) // math.factorial(n-r) # // math.factorial(r) 

n = int(input())


result = int( 4*( (n-3) * 3**2 * 4**(n-4) + 2 * 3 * 4**(n-3) ) )

#result = n*** // (f(3)*f(5))

print(result)