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 itertools
import math
import time
from builtins import input
from math import gcd as gcd
import sys
import queue
import itertools
import collections
from heapq import heappop, heappush
import random
import os
from random import randint
import decimal

# from sys import stdin, stdout
# input, print = stdin.readline, stdout.write

decimal.getcontext().prec = 18


def solve():
    n, t = map(int, input().split())

    # dp[len][kol_gorbov][vozrast?][poslednya_cifra]

    # pc_i < pc_i-1
    # dp[l][g][pg = 0][pc] += dp[l - 1][g][pg = 1][pc] + dp[l - 1][g][pg = 0][pc]
    # dp[l][g][pg = 1][pc] += 0

    # pc_i > pc_i-1
    # dp[l][g][pg = 1][pc] = dp[l - 1][g - 1][pg = 0][pc]
    # dp[l][g][pg = 0][pc] = dp[l - 1][g][pg = 0][pc]

    # answer in dp[n][t][0][1 <= i <= 4]

    dp = [[[[0 for l in range(4)] for k in range(2)] for j in range(t + 2)] for i in range(n)]

    for i in range(4):
        dp[0][0][1][i] = 1

    for l in range(1, n):
        for g in range(t + 2):
            for curr_last in range(4):
                for prev_last in range(4):
                    if curr_last == prev_last:
                        continue
                    if curr_last < prev_last:
                        dp[l][g][0][curr_last] += dp[l - 1][g][0][prev_last]
                        if g > 0 and l > 1:
                            dp[l][g][0][curr_last] += dp[l - 1][g - 1][1][prev_last]
                    else:
                        dp[l][g][1][curr_last] += dp[l - 1][g][0][prev_last] + dp[l - 1][g][1][prev_last]

    print(sum([dp[n - 1][t][0][i] for i in range(4)]))



if __name__ == '__main__':
    multi_test = 0

    if multi_test == 1:
        t = int(sys.stdin.readline())
        for _ in range(t):
            solve()
    else:
        solve()
