Bob likes to draw camels: with a single hump, two humps, three humps, etc. He draws a camel by connecting points on a coordinate plane. Now he's drawing camels with *t* humps, representing them as polylines in the plane. Each polyline consists of *n* vertices with coordinates (*x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>), (*x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub>), ..., (*x*<sub class="lower-index">*n*</sub>, *y*<sub class="lower-index">*n*</sub>). The first vertex has a coordinate *x*<sub class="lower-index">1</sub> = 1, the second — *x*<sub class="lower-index">2</sub> = 2, etc. Coordinates *y*<sub class="lower-index">*i*</sub> might be any, but should satisfy the following conditions:
 -  there should be *t* humps precisely, i.e. such indexes *j* (2 ≤ *j* ≤ *n* - 1), so that *y*<sub class="lower-index">*j* - 1</sub> &lt; *y*<sub class="lower-index">*j*</sub> &gt; *y*<sub class="lower-index">*j* + 1</sub>, -  there should be precisely *t* - 1 such indexes *j* (2 ≤ *j* ≤ *n* - 1), so that *y*<sub class="lower-index">*j* - 1</sub> &gt; *y*<sub class="lower-index">*j*</sub> &lt; *y*<sub class="lower-index">*j* + 1</sub>, -  no segment of a polyline should be parallel to the *Ox*-axis, -  all *y*<sub class="lower-index">*i*</sub> are integers between 1 and 4. 
For a series of his drawings of camels with *t* humps Bob wants to buy a notebook, but he doesn't know how many pages he will need. Output the amount of different polylines that can be drawn to represent camels with *t* humps for a given number *n*.
The first line contains a pair of integers *n* and *t* (3 ≤ *n* ≤ 20, 1 ≤ *t* ≤ 10).
6 1
6
4 2
0
3 1
14
3 2
0
3 3
0
3 10
0
4 1
22
4 3
0
4 9
0
5 1
16
5 2
70
5 3
0
5 5
0
5 9
0
5 10
0
6 1
6
6 2
232
6 3
0
6 4
0
6 10
0
19 1
0
19 2
0
19 3
1
19 4
32632
19 5
4594423
19 6
69183464
19 7
197939352
19 8
109824208
19 9
5846414
19 10
0
20 1
0
20 2
0
20 3
0
20 4
12628
20 5
3715462
20 6
96046590
20 7
468541040
20 8
503245466
20 9
90700276
20 10
0
import sys
input = sys.stdin.readline
from collections import deque, defaultdict
p = print
r = range
def I(): return int(input())
def II(): return list(map(int, input().split()))
def S(): return input()[:-1]
def M(n): return [list(map(int, input().split())) for ___ in r(n)]
def pb(b): print('YES' if b else 'NO')
def INF(): return float('inf')
# -----------------------------------------------------------------------------------------------------
#
# 　　　　　　　　　　　 ∧＿∧
# 　　　　　 ∧＿∧ 　 （´<_｀ ）　     Welcome to My Coding Space !
# 　　　　 （ ´_ゝ`）　/　 ⌒i        Free Hong Kong !
# 　　　　／　　　＼　 　  |　|       Free Tibet !
# 　　　 /　　 /￣￣￣￣/　|　 |
# 　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿
# 　 　　　＼/＿＿＿＿/　（u　⊃
#
#     再帰関数ですか？　SYS!!!!
#     BINARY SEARCH ?
# -----------------------------------------------------------------------------------------------------
n, t = II()
dp = [[defaultdict(int) for j in r(4)]for i in r(n)]
dp[0][0][(0, 0)] = 1
dp[0][1][(0, 0)] = 1
dp[0][2][(0, 0)] = 1
# dp[i][j]{k} : 坐标i,j时, 已完成k个camels的数目 0-上升 1-下降
for i in r(1,n):
    # 向上走
    for j in r(1,4):
        for k in r(j):
            for x in dp[i-1][k]:
                if x[1] == 0:
                    dp[i][j][x] += dp[i-1][k][x]
                else:
                    newx = (x[0],0)
                    dp[i][j][newx] += dp[i - 1][k][x]
    # 向下走
    if i > 1:
        for j in r(3):
            for k in r(j+1,4):
                for x in dp[i-1][k]:
                    if x[1] == 0:
                        newx = (x[0]+1,1)
                        dp[i][j][newx] += dp[i - 1][k][x]
                    else:
                        dp[i][j][x] += dp[i-1][k][x]
    #p(dp[i])
s = 0
for i in r(4):
    s += dp[n-1][i][(t,1)]
p(s)