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
# LUOGU_RID: 133309925
#include<bits/stdc++.h>
using namespace std;
int a[1001]={1,1,3,9,27,81,243,729,2187,6561,19683,59049,177147,531441,594320,782957,348865,46592,139776,419328,257981,773943,321823,965469,896401,689197,67585,202755,608265,824792,474370,423107,269318,807954,423856,271565,814695,444079,332234,996702,990100,970294,910876,732622,197860,593580,780737,342205,26612,79836,239508,718524,155566,466698,400091,200270,600810,802427,407275,221822,665466,996395,989179,967531,902587,707755,123259,369777,109328,327984,983952,951850,855544,566626,699875,99619,298857,896571,689707,69115,207345,622035,866102,598300,794897,384685,154052,462156,386465,159392,478176,434525,303572,910716,732142,196420,589260,767777,303325,909975,729919,189751,569253,707756,123262,369786,109355,328065,984195,952579,857731,573187,719558,158668,476004,428009,284024,852072,556210,668627,5875,17625,52875,158625,475875,427622,282863,848589,545761,637280,911837,735505,206509,619527,858578,575728,727181,181537,544611,633830,901487,704455,113359,340077,20228,60684,182052,546156,638465,915392,746170,238504,715512,146530,439590,318767,956301,868897,606685,820052,460150,380447,141338,424014,272039,816117,448345,345032,35093,105279,315837,947511,842527,527575,582722,748163,244483,733449,200341,601023,803066,409192,227573,682719,48151,144453,433359,300074,900222,700660,101974,305922,917766,753292,259870,779610,338824,16469,49407,148221,444663,333986,1955,5865,17595,52785,158355,475065,425192,275573,826719,480151,440450,321347,964041,892117,676345,29029,87087,261261,783783,351343,54026,162078,486234,458699,376094,128279,384837,154508,463524,390569,171704,515112,545333,635996,907985,723949,171841,515523,546566,639695,919082,757240,271714,815142,445420,336257,8768,26304,78912,236736,710208,130618,391854,175559,526677,580028,740081,220237,660711,982130,946384,839146,517432,552293,656876,970625,911869,735601,206797,620391,861170,583504,750509,251521,754563,263683,791049,373141,119420,358260,74777,224331,672993,18973,56919,170757,512271,536810,610427,831278,493828,481481,444440,333317,999951,999847,999535,998599,995791,987367,962095,886279,658831,976490,929464,788386,365152,95453,286359,859077,577225,731672,195010,585030,755087,265255,795765,387289,161864,485592,456773,370316,110945,332835,998505,995509,986521,959557,878665,635989,907964,723886,171652,514956,544865,634592,903773,711313,133933,401799,205394,616182,848543,545623,636866,910595,731779,195331,585993,757976,273922,821766,465292,395873,187616,562848,688541,65617,196851,590553,771656,314962,944886,834652,503950,511847,535538,606611,819830,459484,378449,135344,406032,218093,654279,962834,888496,665482,996443,989323,967963,903883,711643,134923,404769,214304,642912,928733,786193,358573,75716,227148,681444,44326,132978,398934,196799,590397,771188,313558,940674,822016,466042,398123,194366,583098,749291,247867,743601,230797,692391,77167,231501,694503,83503,250509,751527,254575,763725,291169,873507,620515,861542,584620,753857,261565,784695,354079,62234,186702,560106,680315,40939,122817,368451,105350,316050,948150,844444,533326,599975,799922,399760,199277,597831,793490,380464,141389,424167,272498,817494,452476,357425,72272,216816,650448,951341,854017,562045,686132,58390,175170,525510,576527,729578,188728,566184,698549,95641,286923,860769,582301,746900,240694,722082,166240,498720,496157,488468,465401,396200,188597,565791,697370,92104,276312,828936,486802,460403,381206,143615,430845,292532,877596,632782,898343,695023,85063,255189,765567,296695,890085,670249,10741,32223,96669,290007,870021,610057,830168,490498,471491,414470,243407,730221,190657,571971,715910,147724,443172,329513,988539,965611,896827,690475,71419,214257,642771,928310,784924,354766,64295,192885,578655,735962,207880,623640,870917,612745,838232,514690,544067,632198,896591,689767,69295,207885,623655,870962,612880,838637,515905,547712,643133,929396,788182,364540,93617,280851,842553,527653,582956,748865,246589,739767,219295,657885,973652,920950,762844,288526,865578,596728,790181,370537,111608,334824,4469,13407,40221,120663,361989,85964,257892,773676,321022,963066,889192,667570,2704,8112,24336,73008,219024,657072,971213,913633,740893,222673,668019,4051,12153,36459,109377,328131,984393,953173,859513,578533,735596,206782,620346,861035,583099,749294,247876,743628,230878,692634,77896,233688,701064,103186,309558,928674,786016,358042,74123,222369,667107,1315,3945,11835,35505,106515,319545,958635,875899,627691,883070,649204,947609,842821,528457,585368,756101,268297,804891,414667,243998,731994,195976,587928,763781,291337,874011,622027,866078,598228,794681,384037,152108,456324,368969,106904,320712,962136,886402,659200,977597,932785,798349,395041,185120,555360,666077,998228,994678,984028,952078,856228,568678,706031,118087,354261,62780,188340,565020,695057,85165,255495,766485,299449,898347,695035,85099,255297,765891,297667,893001,678997,36985,110955,332865,998595,995779,987331,961987,885955,657859,973574,920716,762142,286420,859260,577774,733319,199951,599853,799556,398662,195983,587949,763844,291526,874578,623728,871181,613537,840608,521818,565451,696350,89044,267132,801396,404182,212543,637629,912884,738646,215932,647796,943385,830149,490441,471320,413957,241868,725604,176806,530418,591251,773750,321244,963732,891190,673564,20686,62058,186174,558522,675563,26683,80049,240147,720441,161317,483951,451850,355547,66638,199914,599742,799223,397663,192986,578958,736871,210607,631821,895460,686374,59116,177348,532044,596129,788384,365146,95435,286305,858915,576739,730214,190636,571908,715721,147157,441471,324410,973230,919684,759046,277132,831396,494182,482543,447626,342875,28622,85866,257598,772794,318376,955128,865378,596128,788381,365137,95408,286224,858672,576010,728027,184075,552225,656672,970013,910033,730093,190273,570819,712454,137356,412068,236201,708603,125803,377409,132224,396672,190013,570039,710114,130336,391008,173021,519063,557186,671555,14659,43977,131931,395793,187376,562128,686381,59137,177411,532233,596696,790085,370249,110744,332232,996696,990082,970240,910714,732136,196402,589206,767615,302839,908517,725545,176629,529887,589658,768971,306907,920721,762157,286465,859395,578179,734534,203596,610788,832361,497077,491228,473681,421040,263117,789351,368047,104138,312414,937242,811720,435154,305459,916377,749125,247369,742107,226315,678945,36829,110487,331461,994383,983143,949423,848263,544783,634346,903035,709099,127291,381873,145616,436848,310541,931623,794863,384583,153746,461238,383711,151130,453390,360167,80498,241494,724482,173440,520320,560957,682868,48598,145794,437382,312143,936429,809281,427837,283508,850524,551566,654695,964082,892240,676714,30136,90408,271224,813672,441010,323027,969081,907237,721705,165109,495327,485978,457931,373790,121367,364101,92300,276900,830700,492094,476279,428834,286499,859497,578485,735452,206350,619050,857147,571435,714302,142900,428700,286097,858291,574867,724598,173788,521364,564089,692264,76786,230358,691074};
int $;
int main(){
	cin>>$;
	cout<<a[$];
	return 0;
}