#include <bits/stdc++.h>
 
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FORD(i, a, b) for(int i = (a); i >= (b); --i)
#define VAR(v, i) __typeof(i) v=(i)
#define FORE(i, c) for(VAR(i, (c).begin()); i != (c).end(); ++i)
#define all(v) (v).begin(),(v).end()
 
#define PII pair<int,int>
#define mp make_pair
#define st first
#define nd second
#define pb push_back
#define lint long long int
#define VI vector<int>
 
#define debug(x) {cerr <<#x <<" = " <<x <<endl; }
#define debug2(x,y) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y <<endl; } 
#define debug3(x,y,z) {cerr <<#x <<" = " <<x << ", "<<#y<<" = "<< y << ", " << #z << " = " << z <<endl; } 
#define debugv(x) {{cerr <<#x <<" = "; FORE(itt, (x)) cerr <<*itt <<", "; cerr <<endl; }}
#define debugt(t,n) {{cerr <<#t <<" = "; FOR(it,0,(n)) cerr <<t[it] <<", "; cerr <<endl; }}
 
#define make( x) int (x); scanf("%d",&(x));
#define make2( x, y) int (x), (y); scanf("%d%d",&(x),&(y));
#define make3(x, y, z) int (x), (y), (z); scanf("%d%d%d",&(x),&(y),&(z));
#define make4(x, y, z, t) int (x), (y), (z), (t); scanf("%d%d%d%d",&(x),&(y),&(z),&(t));
#define makev(v,n) VI (v); FOR(i,0,(n)) { make(a); (v).pb(a);} 
#define IOS ios_base::sync_with_stdio(0)
#define HEAP priority_queue
 
#define read( x) scanf("%d",&(x));
#define read2( x, y) scanf("%d%d",&(x),&(y));
#define read3(x, y, z) scanf("%d%d%d",&(x),&(y),&(z));
#define read4(x, y, z, t) scanf("%d%d%d%d",&(x),&(y),&(z),&(t));
#define readv(v,n) FOR(i,0,(n)) { make(a); (v).pb(a);}
 
 
using namespace std;

const int max_n = 5005;
const int mod = 1e9 + 7;

int tab[] = {1,1,5,7,29,47,181,319,1181,2199,7941,15375,54573,108807,381333,777919,2699837,5610167,19319845,40760431,139480397,298047463,14536110,191591185,426790700,194535335,669442763,190303623,388935521,486127822,139062193,216941678,851069935,751413862,56037501,49616173,267344849,925161712,652357957,871732797,700539444,647257645,396133601,268833996,726068788,781455350,741117043,759783567,742918242,41860859,312476430,192009072,321447427,34732092,33806458,325066267,751551908,554372087,363399877,533201707,156603031,722699954,915208994,858611712,462850378,429022693,246596506,363971790,467733091,521930039,447059337,468733121,278644239,26619393,889171503,57412042,782338579,949226872,245469453,597352791,931113934,6341694,806025176,899842276,217760052,557841472,768963093,702163450,711216158,888379093,910406639,597644338,926508572,994315082,768155852,10997414,326462370,742058931,463504958,371260784,133036428,95673715,590456714,355984216,483338560,219236324,888488321,342309298,350083538,34253056,118756719,652710289,661690728,19398700,23869570,983307084,38222864,625915863,366500311,236446817,572394560,495922555,709028776,256285215,639656744,490836629,900643476,340517100,382964607,50571560,250036934,234874071,219858937,628607120,916791044,203653795,157680701,507296576,487635248,970588654,404083031,689098578,590446235,617337430,6013544,486679354,991399340,8325554,990849114,292810779,558168879,563326464,801159551,377295804,158070240,167459356,809129432,219390090,866168462,594964024,788433413,654560860,674421938,403963787,831193374,770492844,34565782,703435072,510567483,618012907,767728249,50729072,404642877,819618217,853165051,368289656,296074444,184073538,256370401,580416158,929943512,261404305,312639125,778691695,495300751,743061797,972025833,425081090,766239658,807122380,912963713,949408757,637708625,632713731,178553316,447564338,430788617,998172447,288710724,973281203,812694564,165023091,768129860,569193499,442776557,993129895,314589440,529050102,1868510,414054327,833714184,451897512,404937555,381879679,978572016,694226464,324168948,612389157,197285144,20115864,632087160,240745624,377752714,374672887,882603909,80033422,807878557,149351441,722338539,311460948,789937499,484919303,339651082,12847777,44648793,984878030,103702425,333467271,978041817,94258952,122643334,993903073,355736134,184654093,436516581,399039924,107629577,894219176,111327069,516878980,367739160,895574666,894366798,353924391,390949155,523548961,219945373,571537215,802910542,244779978,898291568,398166319,491207321,111688088,696998132,466741419,24477213,23785955,121003549,146696266,656403179,666400861,302011238,857721654,621477008,676349968,217130939,134294236,919981289,241631705,243207256,767770710,265163174,733843382,263176272,634830210,59189222,566574576,310716811,464287312,860725050,285626365,153427859,868694680,197672923,666341576,925701914,437822353,652750427,224589589,407430445,437234339,96759999,91005012,472290021,20016287,456902630,71763204,514234291,251064270,44831399,326861008,788216213,180112204,724873033,882066330,938751738,47774572,911804344,265964105,267341221,636761933,75547515,787880870,802404278,490199512,387611837,984330009,131495508,328744120,51974757,712553363,581030990,299223587,341540130,327667961,679956305,195799092,431467085,565988019,426377279,84040858,447213546,534329582,410299788,966018618,162936579,182212747,853235231,173288659,906282997,857100434,433049831,474492498,248134475,258297697,260998812,659891020,102778462,867565356,43466084,853079966,836558177,440460535,390595580,535632317,243051360,746047667,221249400,442968275,549684743,864896970,378848148,913339005,963222440,22957479,935582264,390965670,588678111,774808382,315651076,516597294,980147809,26944514,994332441,669655582,322308459,110243371,187412112,924495563,411227448,500552527,234787384,641331524,987025193,294802236,550680030,541829887,735699850,257370822,721841180,742925224,651373967,805213177,564548234,275840183,245325054,457020327,650015809,336600295,623248003,954250928,778245844,352071368,38880247,416995723,950632187,9001810,869900167,288887360,187475200,825400592,213226770,179368961,998418232,637641185,270537038,472988560,757588227,693707732,660180124,135866806,252273970,284461384,325744671,662588762,302411523,334507770,576250102,164459562,57669416,689184589,551377419,87605205,829342660,111161298,710350562,522884574,176820813,626621232,783704896,423671773,198458213,119381050,834136739,151718821,805847845,12918119,443379759,880389348,90917952,163534617,599823090,806876863,413222975,452395996,144460903,583911131,601204964,322222160,448059198,555384814,454947208,749732673,864306956,577410399,747741645,869916809,983058532,993746740,936669048,660234019,130475154,324093575,39612605,288412161,695662137,867928540,822843470,238948366,946427128,208110905,255503173,731557308,229624121,736240326,161353001,892729045,269517079,532477124,873505478,758403252,137322910,686388906,784746535,347659873,49559330,25761644,200201278,91784773,784173380,430239374,212998867,605972941,850942476,143450040,839727494,939980919,399144292,739875701,677184264,781365203,594283177,610254778,3359066,182619002,375315202,400353602,926652803,30512263,840982921,875669451,274287637,270626084,364115072,542951898,178248998,764017963,62782906,410888224,10125159,6755946,43887369,86601224,304864555,183817294,282228246,628725869,104136462,186910570,686230526,919343597,897378751,259626465,211389162,891616622,417400716,500761682,253725498,41529264,844235022,82746280,698197612,309055200,712703222,506718707,151547059,598519532,651680234,442688012,840416712,642457371,806164857,341435573,101365696,728887188,761871457,321530026,928674409,669805648,125634495,903993834,184891139,439228656,433130722,727484887,754361926,36515316,336116396,150916845,310182871,45127581,20803768,920737910,903887117,25431593,762524523,145184830,577943215,789765244,313360112,537660452,15401226,951692947,949589565,175360833,199490340,375407925,349286863,389750468,827361518,715240488,912565509,256197745,250091996,528635336,807546653,425836315,274312568,745491440,313920570,248247223,438256149,700589243,715946919,780171960,708184656,292448181,709450316,237280910,602912754,272269032,353276312,656243829,372316580,856428846,829807418,340024635,169471503,29099005,566612519,342803561,385444665,598156241,352646463,94672113,247283608,329740997,401332811,707565597,619129613,656437467,170263752,508093202,526977653,440905895,462744735,509473280,407180751,217271001,656084248,380020288,728293306,284001695,752883294,95967119,450584106,596416279,544584862,725185454,84125473,597778400,447933212,875817758,95435131,222732939,731771271,912507321,20328427,650127784,361240842,793734708,671191928,269416258,552408286,532233374,721691592,960794836,86664420,598156582,456306417,212387299,793693842,203189130,787459772,249081827,860542956,536276402,654181651,626916867,216378666,941462344,532060672,431937473,460056948,241273694,862718225,332376863,252908380,260450333,279625799,348419295,535715980,331207995,269563916,568613147,945918035,158461245,154676574,151990353,768010428,983806043,271643342,148011646,110953311,316202547,965265027,993220607,882236267,422918820,492546420,863574245,204787729,863171310,340705793,28881265,79879902,531369320,302378339,199190896,305516802,791963416,500477224,725902091,953235840,610835485,81378462,165123136,574381658,604206936,931558832,480910319,756497113,340751441,950994207,568564528,990111656,746077223,462489386,545351442,478171028,833980971,102475005,571592129,450609266,644409468,640646720,869058539,660057217,558762720,97697070,58917791,410926792,150140661,533061691,747814648,94814348,653521861,591486759,907579416,589619088,74633296,918123849,183609619,121590764,252608846,869989984,814804052,239578028,78472613,875679310,682989352,993016613,470200459,919450736,981056525,720465230,926349187,14094036,630290601,302863303,490627713,889845328,586422907,842381777,815204574,157554451,205639339,883942031,85102668,822031415,592750909,651596042,493728101,942244314,555203224,937139369,564200856,939819798,994924922,809309210,418774305,265476219,168988702,134406054,894638849,192495846,860908314,299304152,541718431,981349311,766616429,477280763,519876444,471595163,999592405,413970278,875085985,992082790,624551953,225352248,948315771,572688272,420328241,558721284,227226123,130616084,220081212,832010676,309832802,115697611,373270554,93633934,424169054,129239903,459920172,307560046,586641032,95962188,295704754,879296072,755772106,149432400,39371640,527040480,509963765,601048956,573779524,950705902,509730401,871578487,734009330,82754093,706034877,660332026,956404002,893804061,203528126,88468414,883908005,33221238,420034127,939731968,960388421,739972718,264561285,749040710,277220717,801563550,415970063,236630755,457542996,624978250,782542817,440020363,22147733,364356548,531040554,155150738,953131611,371715422,543457179,202060610,610727155,827636133,527961417,538831212,881224178,378941971,63493163,263812232,913483713,618404108,649351405,153915113,918279258,298303841,109186307,113284130,731770237,803392857,924952020,260082583,288981249,358210240,433065980,940762673,383745982,589779962,521223684,811787240,212696386,860754478,832291267,246845940,939054114,618646034,894319084,644576249,252537639,438804011,350303369,17018757,725132692,501321648,309890787,123746504,507759776,386759057,568325315,296927787,610311987,111407321,206278719,746779401,731479761,703297704,926747113,963387317,390062099,670286128,620020690,250899743,76701792,906102813,79155345,876619115,975745795,581348907,490268270,724583247,882835010,939419740,170226214,158711627,405933140,288001154,128598555,121200565,630718610,625038908,907976000,691068703,266315021,605836137,871858937,561226264,274741212,233161202,526586372,752656343,882989883,23948767,406350059,884546419,291564987,236769210,230403381,171114385,236502104,986347363,687186375,333414811,583375522,166995463,437865336,376717054,967276706,64704553,428577495,51268642,905623971,965053861,836828295,568818145,427803953,562062327,51774961,789736896,936992778,243196216,696038055,121664744,342988334,50970893,701114665,555142002,622734237,910894466,857258402,447200174,979409747,300419995,490888801,883037580,670429316,989971351,524570218,19054461,32501373,122166129,859424427,85347227,727336951,710715576,632173845,396494397,932556732,54596634,555304326,274398547,45067793,913331227,896292015,532577683,846464658,290662344,565642247,3271512,198747682,407309900,714095610,650120906,32331681,15026066,822583521,690245233,933151944,937039566,265767743,342654163,800246631,628455737,860541078,606449346,986783392,792914801,114506480,607757349,3584775,830441590,328358502,148041753,22449736,489024731,169148160,805370506,743850310,903812117,106363492,924163321,170044100,112578142,480265023,298264465,851594871,597983123,387485501,568920357,443938702,594638461,34876106,853667588,926714803,414432342,124970778,493238575,984312854,448341412,169471853,683967935,773349481,598602746,250783477,297375178,307491566,507108659,199639270,920604510,687179542,136172586,937594742,283707228,882407289,615936248,863385371,574579465,23241862,770222112,944160515,198987338,143571727,884105468,281251658,214819699,750550712,145560507,230549347,897780215,496951526,687243676,802430549,666592105,595724386,191225066,370612845,314900881,849659044,644020717,652860097,237782324,901481782,516310522,164290964,877513487,179967842,992476131,400693890,778816152,920370869,177190166,768229833,68030150,639663727,483417897,562876042,576005761,195916697,119850663,451527604,262607190,388867185,565555933,451950169,600568123,49288703,900281768,503603089,708051461,829409512,782973386,240179049,829278242,340173905,168182515,114122929,732793403,526554880,251489948,903461105,561392040,48990786,782157685,852987494,52448015,3986896,165317837,132163468,760280447,362809657,6460634,427647444,874676790,344716547,313463443,777654318,495698951,195048157,877193160,162359248,956297962,758675222,386244302,55474862,269682623,694377825,197803505,737322368,68055237,524483537,253132778,864679791,488757902,352141372,170556436,294652371,100974043,697850393,698622908,870978021,837824745,13698238,540870697,779739705,182091480,412527173,371328779,769177508,652341339,181061775,319147553,234168526,425779704,411979613,101298324,301506711,906908394,900064936,520855026,565730366,694025796,408774563,899626500,229781234,158441947,631330280,737986394,735213638,684386437,549256753,151672796,224505017,904028422,649599403,11284044,219690629,473233390,614707245,649114646,786740064,520824045,806569376,175610866,954643225,436119034,27972402,364301899,998835381,90576438,804859219,881447745,20912709,686168639,476164747,10835390,956056554,944619271,870194766,574247317,892019655,506781240,240822990,1989686,126831452,259631962,789785249,358466370,174620665,424640433,955265740,184452758,555990916,665340099,703097363,402215002,474140921,154926834,816641070,98062628,370928618,36045113,793718915,695573162,428185912,943091296,882556821,594387502,317548197,418258886,523186577,301149798,505077849,913605085,796347366,333509959,100409781,201349432,711059671,26167624,293026095,664555062,290699104,575063380,197922037,121034200,616298995,595700583,733511161,254124050,137884590,38141323,701103663,516631288,837625351,225144545,135367499,946168633,118689109,75884096,742250966,712154213,672491043,481444704,369091889,182517876,792306490,132166594,632556439,661612653,512303409,9444756,490976450,10287161,72333165,175527813,752366163,31315751,354647877,803243007,843543306,96815605,233732985,757912785,879156438,32051203,187299488,470752585,870274415,152806564,308520874,75461433,174301835,574987969,612236354,949436601,599735435,47780645,894290852,931923632,635242366,66255600,174117364,547001528,484347475,609699520,67801519,964701591,753922192,401949129,275088979,756025338,666979020,602034033,519677812,845457709,658952031,854277168,247759354,58350191,555012975,285076516,970516369,796262272,563364639,515516073,945857877,438263952,277168138,869128125,775384106,158152559,888657882,251773427,761810534,278941335,594519300,25862591,744615405,566818576,667955606,36366919,447970136,5041022,40748786,96620638,188459454,666780822,190812820,381968092,289243286,724390841,43264043,259700595,721243333,221588437,794016900,252799097,788891349,336179975,375955291,760450500,895490156,72331784,768333165,753661675,107056408,475097827,596394993,618083453,221621699,297493743,874609887,641700989,133038708,191180369,996570423,566681939,371251262,442548327,159171127,645987228,181787847,301537364,834996678,574605434,107130310,938076915,106959410,28149544,8582092,101612816,658701820,622242081,28391786,923509808,625762476,22054348,649956716,366076469,193504315,485238030,156141911,767997905,682275791,668545276,307540866,620717546,248562545,359277714,411939489,901712113,298187566,301511450,535907625,976349593,298899067,526846892,101676622,783893913,147418010,646517745,838404106,616361426,790832975,430750207,5026829,302304272,797868190,502649182,107743669,723434877,100960354,372225325,961439739,39555432,779738247,678142783,947928274,930284876,739895851,270646302,444179500,700297899,633314700,367523076,460261059,23091332,234325172,537924340,752625196,119023391,662620499,682311164,610784192,268501855,214546114,234597786,771074575,245942494,816273897,370375262,335941167,783008113,254619672,858263669,555282729,685356444,177226412,410522142,629179268,489924948,895215520,260205863,246588379,273794340,608343693,38070392,767293356,648797881,527492530,1378682,292097253,588330552,338407765,441807172,767147177,859715856,989787423,558722386,582110759,840388662,73170238,667506448,792293651,587106625,274127371,309574603,872499973,673723741,848610035,718391272,606642628,368459051,860714669,826806477,681988083,844395576,712712502,958611711,496617803,869070718,469422021,546056175,593946554,826061619,542979611,564144058,52060443,796553053,683167352,755993842,645139969,558261443,523084256,720952827,576971672,316801804,812731573,575868544,726895668,181396947,996649759,537490345,804799781,222070576,934193162,534598038,938791852,481377797,810365361,64864092,431186404,56965077,277781336,726457903,717878121,615129930,604081192,53552153,433471185,27598822,421915506,926627478,506116094,792114601,510588435,397520652,217293733,627149415,502672020,886792271,572785352,805947496,153162951,724168376,136101700,444708514,978364303,290854127,840274095,553110557,141875686,943083036,141233313,111715713,625093101,585333334,594754079,945508146,768967333,374459076,28333501,180044223,745344401,30821457,8934686,110333743,878242753,87486721,903689715,69839579,615252086,440022902,819946385,959961462,995021316,869926990,806164499,222109940,570013,667469846,274901494,552212512,502528575,661694672,75945368,136974738,437708859,286341925,920163785,699353331,459542396,17144764,10892917,73220126,272948229,765556836,132751714,562173922,115787208,918096175,506788813,767866130,620768636,545135641,855183365,345773632,657582104,352485090,547485562,152426380,229168413,915615966,261171033,269189943,748345004,304259823,942692662,798164779,411676357,217847030,603908336,861357755,325946235,235965714,991669896,691236920,402047623,877805992,221146203,75710361,508024996,243181068,721974301,173491792,533254618,586984605,31012480,822978768,858582988,186102252,572087205,702481159,60323312,228090087,635597385,955465024,4948495,876292048,978322245,585520606,492954572,742470948,863926723,955266269,894970799,655740377,529015174,25251458,284845481,645445336,100035422,136406838,770657831,950536169,563875007,979358500,588401771,114879014,945896150,236429328,67325934,843939852,923226814,378273156,274246646,683312753,29408090,108754425,345332708,16928684,955594773,961975591,722550479,331027703,994149091,981381277,299324122,542792054,727019338,82414817,451929026,151102496,104675309,662658106,305314666,598603636,183364621,162540136,450466709,388553819,423498945,12659333,202997274,443972547,313259689,958437012,253766025,382843065,509274123,167077427,237708253,976648787,215141086,360228512,430709198,942103925,25189302,876690365,61280827,752632735,538356436,334611056,923571553,850976260,55518262,663965290,645186776,282269401,517392320,881592836,432393953,509566393,934225908,397150974,261569031,714590977,953521962,50816827,451482767,55416008,111269631,388787286,257418052,681197955,321997520,687588891,860597244,783961140,782246662,916376723,332417765,413965678,341210309,924317645,242842723,258638360,19911940,815738960,972986704,393190260,922219060,24008879,99660888,271348413,453296441,720638114,761380336,684674993,329887331,713799627,898923742,939246344,731500755,280740514,971208303,784638134,660361020,674636421,674554851,373018944,292745632,704548089,602221933,318088112,61133443,76531215,371617679,972829003,346262548,611012084,518756133,870548504,210491040,32627571,635831408,369545522,75623592,259883743,892530922,564713059,395134327,484407817,474115884,401455205,806071649,816508899,43153649,535833981,178449501,964400938,345553225,584309243,512511831,777951377,907295669,148445441,209157515,863651353,288308422,167570882,193886609,890485864,357570281,386598133,101499591,362793574,915526994,919434696,705107879,168519818,562128122,629815691,597208302,83863656,141100651,533792270,568044923,737466642,208449774,629299460,546212724,980323814,279163375,499298171,617058002,732010503,470329293,136690074,854919899,119910006,84170792,528071602,791039798,166294381,846082821,191048771,303874278,180894862,355274308,253233195,973942118,707583807,672146207,467043814,564143458,529418344,908557117,405369245,410367409,36842539,553384174,217295958,340445964,332779795,729879878,458099127,725336425,824970217,182608095,840126827,977855467,476091387,509427135,447128417,812457103,966299443,705820297,310538895,123572902,178762482,135506611,807300668,473690597,369283177,884089196,876027909,766045946,160175591,741624684,963776134,479482885,850294151,915783268,382448961,923462502,994271873,109252061,201319720,177748344,959455848,129861386,138090295,174476535,763223955,675930018,641531880,598271686,121138991,390537903,144492772,331541672,96561653,168910122,627505203,534029666,950574927,914995957,681716667,121584681,288319349,119373734,103705508,622050091,555216699,254943603,175537289,863329243,253270339,788793078,337397159,314790135,641771740,891210368,707735935,786626820,696461424,169589824,428563906,669370702,624433108,461525651,796350612,513973151,416998117,854331070,959656477,603015807,85001017,425087936,105178916,35867679,387272106,528853015,219522334,467426117,593419229,3336077,786929834,41980643,444750774,131023132,596298579,938171339,665238394,38778933,73273034,252829923,725478948,769016584,714469991,140866528,425143015,648240487,571910005,187760434,91250869,404601412,82955424,926893450,102653158,458283015,224525497,857357706,388291889,458459931,81795515,383138412,11663362,10439652,55869390,304501394,776610958,508492144,346817141,411043989,862539394,291559568,170737297,548599567,609411018,243217074,314667188,672171263,288344076,231049571,327131363,820901686,623197447,917666167,704924654,858711488,832196917,170069243,836729223,985871906,481931453,924438233,294670804,999117004,882246406,581212822,809164841,802431937,32358369,656631079,410337258,517027261,265066282,358943424,513085687,491400392,522057831,313723048,193619575,528845045,638548808,277892683,471431776,28873294,472041909,667892840,751911393,707524664,670783486,429791124,871932692,19831043,655460148,67108036,100596502,744952825,791695149,632415896,639917218,388782876,697317392,404175994,900304150,81611699,864135834,710741196,13889866,279812263,601294124,839866714,483615779,34218179,519283688,50547385,658945827,911195404,799228268,102773828,603232446,798488752,406674821,435932647,91889743,954260001,184189217,621817302,796202248,485821527,360249777,63932751,208614826,502354246,630552963,389706182,671071239,146664790,306543283,761966503,443562841,596786592,524261693,893287526,359360110,266900992,611882307,872951601,581550102,438911999,622474290,282978648,433380152,953746704,207633843,855476198,333853911,92426840,186415406,56211503,671669224,929100318,873208287,994000800,607626433,662228989,147337256,511468715,464949191,999627378,394102308,764978339,712263588,149280265,435351280,633190315,572434456,941382212,600067771,877684327,555571946,788840548,244396913,303581831,340354394,609970283,241003734,251346753,225704701,505440172,687994440,380239213,824461732,98767157,670919496,128926458,270611390,724120853,260075862,348338767,476905113,63561488,557838308,455938435,585391780,845196196,446567711,299621119,938945364,315498467,447833005,733161832,809822665,812555747,54579461,753224915,670188206,967020183,944604963,454555734,742926336,647752983,524284953,723753100,20361038,519519502,100122111,921415370,143197059,556307300,542205770,266411621,159440538,551067926,580457459,627085979,995544321,784849550,556332035,10187808,689371714,721639962,511395045,672864542,879914205,605625663,850993920,240811649,34605037,949314239,2443575,515184539,37699796,779282455,671664291,979110712,973214276,506990539,933623885,288139614,377150862,592601343,316655258,475451767,900869301,94108296,890824481,496713915,665901252,358131576,713966894,919424574,980749809,746840372,435930143,981205957,270202322,856316097,523239146,23210074,616137579,665122426,178657568,51175265,638323234,595284170,105538021,813136844,942887744,841455520,511574244,819363923,173450557,12320312,544992295,243657209,122291289,81890112,530654091,739213291,70388834,444879479,100925453,760039362,822855076,507452457,483470121,106754397,663919150,240098948,471955332,510654941,437175864,878092365,67712301,689836739,582810374,917852335,584135771,259669328,271745955,141818514,98874886,986004086,268632816,522205644,850309729,788378700,127686559,734152645,851364960,223126698,348255,134188750,269422265,399457033,607180854,121823149,65188846,538537021,272640573,597983622,13888949,76078825,193824497,201597598,984668687,186086799,326179638,877406762,733352424,680302840,560662931,899457164,480903100,871099712,184908703,113204664,781135437,273712805,890831907,276421375,225338450,780168989,236353314,732911617,174883162,720138647,964926773,323496628,541773554,70456009,766232673,162359133,623416271,485603142,841455083,883724599,291814419,502506817,880456884,17907806,677186250,845060636,721680001,731737501,628514984,907111722,699768375,485741355,70787814,402202454,16768343,965553098,981411218,888400198,721034022,362893697,888889446,183904943,34478203,994187288,91809171,428312580,132052666,84319409,564796816,951486952,597364331,414363723,620820425,612759620,87980494,374759172,13459819,539015828,118411106,319477717,994188752,783403700,549373628,603571513,855263896,510624438,587040543,58922027,878965676,636254283,909405573,396664410,521545518,709649329,983935198,745581011,442967588,397637025,124176800,673538344,719607081,880388668,919598558,599914313,958624279,692049496,259971801,292045590,364006576,494809613,81638940,318515840,881948500,259255370,164356219,699667184,892403018,669271192,15751410,842548022,732350267,463546565,124143910,374218310,120868343,54046140,470697309,3182354,418456628,233234028,721837933,983136843,131787457,609964156,615290676,725372389,296616785,271814113,433478574,410504808,121445324,971554732,307445422,421769948,765876155,979040749,255709935,375979321,519088440,503485648,564236602,633980943,960671678,926751735,735518476,696327080,599209567,379972085,557572857,871490487,415699524,291943765,830986095,836562274,166082805,25279449,548807313,526245464,698912853,452232474,1203486,739854275,483319001,733389003,916734995,622756621,995718206,616896034,220946658,114374440,891588854,19385589,713537726,411702999,964019162,642889152,177835762,549376743,632260765,489029466,874841213,45458116,715439857,865750113,877819776,835161833,303782966,331691523,574731937,897920685,520037160,700610284,961332034,581182910,46361894,232331236,603748154,215394273,242032994,556210822,838520619,58999340,633560523,512625054,925931663,537720633,853236234,103309169,766327026,560827304,420635665,648678296,559263573,351459821,380710347,507177844,156486715,441779675,353019488,184310740,427679937,440384572,163808941,38789081,569004985,16804846,740624640,769787794,761449487,434370172,153088784,179168861,817604074,598308572,649429345,835758212,619804438,765598795,390610883,449188756,70210147,912353856,35338139,921885151,949784712,162244701,173843517,536814887,595160318,452869011,691218962,752067344,577791553,745317893,224010424,704783678,81598614,340973904,926743650,518989153,818209235,921755918,298139513,386202109,666822750,221798980,444066196,607557770,547314114,283342696,208627720,899744227,425371600,798888912,873892610,61446076,744569968,941140078,115990032,208233185,764436466,801930621,897170619,993787876,679087581,646889938,331042598,501918639,996965065,602043270,194981707,859009255,302963617,315319452,539529748,607608414,833806058,779575818,60569782,289982422,761674190,21860658,328743872,320201796,626635201,689390411,258686404,880258521,536576240,106636715,823002143,887280041,243566483,16246147,763191743,396265219,82105646,921660251,89637426,85577023,440066324,788112731,896424420,633736939,956747117,199526469,269294268,134059662,76002121,764861993,757730342,165683142,604557296,176444379,166560632,529142155,557966199,851395634,376689844,426941698,983952921,142047632,235954006,493620043,695102097,492360314,70026898,359092587,928265868,556713818,898225219,822986032,340647693,680147042,382237149,147668021,442047482,280587697,887317833,246184124,154321726,552452261,567869693,98792782,901194636,967030524,637644928,427985335,768905440,676812563,660341425,921450129,823924512,24283262,520340046,584933707,730887538,743509424,679681441,175768827,390581963,670644877,513035629,243983434,27073741,675779214,432779644,45460929,389260783,773780806,715343947,261582019,669195865,757122826,521833226,683062141,931623946,304889115,404650047,298252649,810455432,784475975,318218,633302256,267559159,677297005,157271473,588477265,648768942,26822027,999950873,45267556,90387710,875113536,21390188,155458705,375087974,736571535,598406978,195291067,185803054,463661923,484733001,157258283,768715562,331016275,968179222,268783085,442103815,232306510,790924458,176145746,725064852,793467929,762130393,851166146,988723450,523659248,13488818,543192117,126850681,168559196,717670435,676415751,505842786,121989885,761508121,964747610,214019555,243091282,128241222,80875866,546475398,200058793,39543766,757353570,633338431,158534110,217083499,382991818,417234126,432188121,116078606,53779819,455795456,537367087,442120528,394340316,115042202,975469480,296065552,594224062,76644766,350567415,931069128,737963611,269134578,5469459,818342652,608164815,671357565,531777679,77628032,374377931,981639958,13847896,972615652,971450447,860747822,808845518,199934474,608285764,816374943,715680065,880484938,716911400,75277586,235436629,696706016,790673188,671464403,337626829,689646853,963635559,996211656,568217989,125070918,270434358,916081470,794309900,336864182,408712766,828018071,999324068,482702321,378304492,204715933,687840688,989829168,854625492,678738460,859599329,755414017,660721698,587685426,68904545,900865361,610310362,923216786,506725171,783100679,668874338,687050692,673961219,409074493,349052296,925328064,938689075,653362314,353526058,667139044,671707437,344831985,625899677,286295295,116649790,92185458,290825686,858207746,232038489,38700195,112056472,340213529,428884408,878409396,997219767,629667694,361499243,612001554,617535720,71076081,356716982,926662207,982968892,745924377,632577350,502927810,736242901,981269218,392922650,729652933,424476107,37910992,273504490,660741956,275119787,532465428,689038913,975474096,14357151,955136576,646031016,157471732,309561517,91538223,16937566,308489801,690806991,307083371,30557293,982364699,685403238,317900545,261858311,477418250,900357279,232969287,365887465,430682784,646401233,584850804,652658876,59870143,152588175,484786779,905723073,265806462,494458273,786335925,430793847,220595448,334321776,330429889,83179175,157648010,88913646,650771322,989609610,931533165,661658807,117917081,988581272,330913773,680556080,353853465,960633400,982827181,342383476,633248474,159849806,219445020,244980925,148296903,635742578,716375858,317582880,784293320,364780195,82440329,392038121,31397222,796784178,687760015,455577385,974434801,185000739,293305860,369881415,619680403,101536833,62114861,223247289,632839161,111580031,121677531,893846879,152726337,571661621,601502246,979966963,764440643,607499212,508320332,396041181,317043344,248928229,448986483,609310403,565580241,157443530,11627769,856469399,747822098,343683032,930832344,839906770,472310544,277467589,971866803,357667472,630935332,53743915,293812,460887304,922656044,629674154,27316412,868694920,819339069,917402696,292822571,388267609,655002924,20882233,6773224,43800750,107921172,15595626,354954768,84603150,234070597,224654366,151520516,256692128,967945804,296840149,497517689,453486958,399526969,552592480,303765853,730476824,372251193,616121325,348996215,788432287,623853205,981404543,834368680,526065157,555236333,278958953,223626891,771696775,214274209,246678550,136179720,986057718,380654582,446366946,34697624,799361077,702815019,679872967,468190970,708365167,821303230,819835688,103581038,528397012,367537131,91718839,286049064,430180242,718507669,646699473,448921932,307770213,962306215,756723367,400365351,205857835,612811716,700911364,240257855,915960896,552695343,483354458,624794931,613527746,101440264,680823111,665967007,141338593,280578193,988783065,819300695,918898612,295699281,184004418,255106672,880520792,526361586,835661305,250407347,966910136,685042299,995754525,46635919,875111410,890130570,780453541,231298764,376560157,447016599,608471654,557993091,448964957,571909173,387112846,489953197,515036414,499932405,57891692,615580592,658890749,164523253,392533311,278636374,343506149,522921413,961164059,491092336,66807192,606891385,46239308,913152764,975472931,690404126,658876780,388965917,106129001,379155746,144046892,425561015,832975295,942633621,771344668,370590171,175152550,462075606,785605661,957438126,645674853,163664056,678934355,848860871,388216451,323015494,298860015,566766505,999767417,699834328,507773168,115049299,791125877,927399644,333865933,449930777,538483860,426760037,245866087,772012278,179288313,674613446,97828412,219497148,27359552,713210548,131244570,402120770,417715547,41793390,180735556,486851282,839577253,139708331,954939173,329003325,168511339,324032646,386873337,745844605,888475896,14485579,36518503,116493743,133637117,616755463,460240957,770748289,260415446,833075745,111651973,722531167,877082986,921759452,716473595,198225518,478200842,551078231,293962393,241159465,237638198,198754784,914273973,424812284,577078945,428594728,369786558,25357286,184153611,444379080,744929903,822997032,386861628,242714331,429316607,586776200,797867893,356064365,277436849,623066786,899814535,668829407,797126986,600742172,20801478,843829465,643241807,817971988,857930740,169777416,791271891,91876016,126724052,529076152,246257916,79744274,774681288,788595391,202018577,769823313,645664532,600798982,198201930,198800792,760008413,116419188,583589888,516437333,748874036,47060050,829758244,800696631,348653320,99396512,655730525,609650579,137382773,103717269,637363607,585879014,376883349,511403726,401279059,336769282,698686771,407681374,492221031,207486170,314244601,250947705,784881160,322605421,70046972,107910200,916131756,155994098,75330505,618643304,527303812,910537522,165144267,61901079,401330217,988363671,905562296,776215577,752071987,832790684,646032654,790437339,258440402,888192807,400049403,464677206,981605799,357243195,707075762,485881095,992189492,442022248,894446661,114960045,535426500,415733128,515833737,278866844,384489915,605580355,465327648,747396347,561494385,365177790,851244247,798021850,95469378,585004292,251514152,258041166,663846565,101816614,245476696,796403234,5470980,400151648,888473542,977402014,108890512,149987045,950677910,351316941,591966201,237883211,955879554,625408727,89540968,55308103,968517172,102958639,454150922,217177754,643348549,938230353,425792015,666275068,198563905,395953000,485017769,157894524,237779048,949241668,235116253,317957489,755517809,464908071,138551455,671827116,224225250,463931834,815061917,21919315,749998185,565754308,852331265,401925433,67370981,340518254,768463612,558481972,609886512,895218926,823508627,332674004,24024130,46070265,856100271,850411330,951861415,454956792,252157483,869185335,87362398,782280787,768813591,884469522,514250842,681910229,427414563,900559799,400127478,501934332,824444728,154692431,510454787,484986860,597221797,649404160,729163480,406539419,414532987,48684217,169259375,484571401,507585377,468884943,520627426,447909667,48129242,439987478,315543948,951050323,439777550,732706048,200767550,599653230,852504962,503969593,249781474,11471713,685068656,404552444,584527240,382711798,398692173,945519733,926513640,689586451,271655047,612069433,548494560,933197405,393559331,586710856,175639334,111411222,259650908,853535482,278219197,117044819,831680503,14495449,515945699,75377738,245994194,718121602,664469790,483304365,589773157,629459395,690229294,268836752,310345491,427201231,315630525,912864736,209905856,158405899,259372222,993962141,617203463,216293321,146425490,941730943,17338260,859869335,424551133,428710250,663393116,612916968,297270914,433292718,662559143,624996426,229871755,334732774,973208766,950615840,452352862,756553223,905712533,81084707,594981106,433216326,899414293,98477543,855694828,6822271,228372307,477211427,433868834,299371935,233931794,365979386,635560664,369059472,429562444,966303297,31884126,962678129,766251213,420536785,381281549,24173439,129371329,331262975,22970094,39729106,573250909,265689129,981872129,760811631,29961992,342358863,875265702,777607979,891291964,115407837,929474646,205172789,456927847,529374054,771384271,130890683,910449882,213571799,878635537,397986457,155738169,505435702,851053855,218414795,549811618,754867614,338319376,941241580,641966386,107657484,834976602,992925649,848181442,675139803,317040973,659501341,376956368,732416745,571735761,340721736,944982278,912129750,839344945,415079112,113040748,471318825,58890032,531736532,661975116,919159814,236581155,230641731,557609075,807143336,730549802,882529591,43866309,735321377,687319995,580604100,287391856,316595998,293452291,536692569,313103926,236285545,539351070,787558768,367323831,97323945,114138171,520248177,643845165,848434847,10002701,565309929,519435863,734801499,509743477,223891430,651655273,974984829,745451811,415858081,123696828,494967892,993066323,471036301,69929302,552967500,954566278,568035035,981154184,666413452,789891602,579023539,660939505,58949606,764412903,705674617,813739629,744503088,372165263,977839776,652415675,238350650,326100939,367253821,819098807,739959063,513566252,247009672,136959073,14947155,389990562,824822589,757300303,989068352,829332740,625870508,432723340,743058190,750014917,729204383,155165269,497943673,434456307,362743619,466633802,21498447,525190715,114876764,620941608,586513501,943715249,646970980,758732227,458377373,641666310,658464725,647785790,270965734,523197021,859291237,725134641,28142965,487108393,58645674,986510600,148958208,779642332,6159274,708238584,434954983,735755074,776375083,708251213,745627654,273841169,784565286,703180638,760057113,603489375,487150068,220106903,901664003,350381167,405754322,324456382,866175723,962794239,524115619,254380380,81107603,452397614,148118030,503491359,451336801,124202611,602415618,759379041,326004915,870401284,718817299,834928809,826309494,700353459,879635379,666667375,972240866,176492333,269707243,554585469,918292660,905066071,565010094,903463057,501956375,862470298,230809700,283948945,260326983,584891178,950763298,517910682,888111237,866793615,397920913,551574187,296911099,363949946,618633182,913625129,683149783,256973642,563396619,556394585,802979013,80540225,570017475,216389124,142830659,623045904,674583778,71410111,166571542,86937081,673588788,457720056,936206462,71552089,951723550,239362938,333896505,580108260,161906021,216994785,919707633,685777319,130677509,593477733,578987986,409512441,555988826,980406987,628780431,609829495,106000262,647759475,613519729,166021472,172602117,110689643,739185637,379902161,977361219,536815695,5715019,791335806,599816662,478628848,756707668,64673594,399470178,146597419,491605365,200837904,876491896,884475432,398426524,462332201,119943960,259400337,878632554,296028218,227954077,727929141,139720499,590541173,600243836,329418328,459568150,972498760,323701949,328886958,628879756,432840298,752319850,74259085,405477706,561280543,338994190,994841285,6665119,742693996,505383342,44709735,605569489,986728794,790166034,945765382,262028838,269275286,324637079,520994555,15900333,533262980,114226952,29406790,401494436,33540172,271563645,289759927,394210782,849935415,882503162,168118448,983746368,785364582,521968240,565289184,696483074,675992148,441433497,627086576,578473629,273631711,282684295,521847862,891748602,335339123,345924031,561843075,161458229,412358551,309091782,806773701,540822734,681454040,985376268,603681791,163492358,385880557,262238181,246180488,279075512,576836149,990898827,751827137,476350727,903596254,236244668,471957756,652649509,178073884,314096281,835966103,614221035,125654126,93971343,553695394,389304810,835494620,838903656,661771316,840253579,103484450,727729623,812837722,808864292,213002744,852598350,760545797,78886616,241598217,719856282,744910745,649390315,204541423,357253777,820233290,712227897,510354429,157392528,506323945,484825467,465442402,385361191,104315581,364714728,411579331,917302839,196127995,144164486,983589432,399672308,703738222,606493354,853234188,525948417,710157804,998160845,271315782,537114078,797973514,207289241,328729163,279326042,769606441,377190994,740076869,611726706,888853531,612887159,547768745,934198953,45425633,893448111,127481633,935307585,11000630,827924001,718814902,921401786,137951050,40107437,82325148,284972607,413115660,681149134,458239636,959926660,741875955,363531862,843912342,778420256,114367752,563996258,691207407,74403567,65015753,353242207,818771748,697270103,880727002,853264292,64492480,688777822,343193648,752720748,865109573,988381369,789102847,543349773,494144375,618338055,57519558,970053274,584019325,78198444,362297057,959189446,185966989,249502295,59884182,868275249,694012517,992850760,479371252,937294763,35865261,883614797,71332651,793509679,820244517,21018043,22696596,108447321,114155351,553652665,873533615,408025204,968356929,160789449,602098949,686566238,983671922,27042530,386083634,853294858,740439586,40763718,230069560,582430274,490095786,727482380,786242796,754932711,749226898,763251908,252296685,794349080,13622600,410292426,370882468,972642207,829385620,576697833,268278209,266649903,770578675,341107045,497200390,17721901,39119079,131403861,979741046,353693661,762244845,585570659,704477664,165667284,363763195,224528235,410284862,494154422,35561917,553587093,285146317,231053899,283081544,259324778,65553563,909081460,988605843,704456038,784435165,682238423,937384304,921483856,422452893,609357333,489630355,807332695,980487749,382973555,194385226,537691110,471962581,556998478,554450194,779895808,22495278,384677966,499321378,152676640,591004402,640038717,544029107,8174344,489479393,3481811,353860916,718167265,348392891,851287563,835935712,225734085,612225140,901652528,434079335,573116233,40736840,800822372,487489871,377446837,296045195,724430894,548786842,270866345,81928686,976456407,486660430,902690060,127959049,963988264,362962220,617889211,963554870,780777352,726987247,796306529,812040480,13000519,244749470,528500497,79718039,744937562,168635074,572082820,146862852,9974150,208629244,447180938,963636944,268816681,22319151,851088345,402628904,358522822,127017237,329602933,654721126,298251037,340315248,575383600,561878772,849908330,232699696,15124361,122210211,289793505,670611034,210602569,78643482,789094671,709252294,785788580,929932618,217230948,954720503,561133836,302801118,289003730,440177638,747366459,661841328,565782012,41623723,780593475,61619613,465019637,384675698,164410293,429011919,351254710,244599597,542963317,950369586,529629102,149534097,887955493,34775627,733417719,66096806,332446755,593696073,184732397,327311340,208819864,160798451,948056494,998014106,840197666,179659504,879911992,474927580,589591115,122411705,13596741,271277374,583344971,719099695,188234282,975976397,516655626,546945334,643857532,472188854,875950290,91352309,810555474,896865208,225396810,482665686,641521795,980238273,885041910,595316834,845759377,449475143,436228396,340610505,989906191,921322122,812362789,223272198,883632749,214286346,79470918,293148347,824709448,143404715,760937760,545763914,374341087,691834257,506691761,437140902,394357073,40870605,264812422,732517303,259471858,148463928,75343423,76282918,378596105,683791492,503371285,132452144,775018136,427622380,180299147,781344130,103585687,594291225,499339504,966014324,430047139,147544422,585230254,554036424,863763596,725259382,41809524,749541744,624512053,752705574,378947286,456118213,49078270,798860148,744955099,703572633,642010542,214394751,354821114,655889133,376241594,367419345,863563465,785238072,161166511,681669251,846838028,936225107,412964270,700670498,640233792,956696414,834094183,576151513,654585554,636076025,235908691,129172448,966070969,398466096,695145078,876693068,838821349,515247660,546959346,975729819,592337655,284520533,346054017,128236292,294634628,430132411,744168699,546576937,325659950,715663602,408307040,150361959,525645031,628755684,834446447,12989551,529318429,583397770,754750813,866655639,997563696,370543125,733777317,569327791,339987512,227447262,474857053,969190939,362953016,87494338,263847717,908234748,608012633,816638821,457315520,609358322,590663190,242974190,257937936,953772239,681358272,350035921,744146644,680277081,592994073,426914470,632811145,542768341,983970103,404141657,760193602,906798040,94176858,991721654,265973868,104883911,7689419,678189362,379446974,212105828,562552571,247266810,182191319,616117385,778808720,552479665,441385469,274042061,872240522,827112978,270947494,98429166,9700807,507687895,44478204,228362542,590159696,754202052,278883171,40450879,917551271,363178587,479010966,443178311,323389506,476607804,923384119,692945804,156043937,958977264,386086325,969893041,98045036,606154722,506444545,402758927,324851475,1563993,977682411,314754778,562556768,425704748,539079786,601276143,819791630,837762477,134899816,894193187,193085808,701132643,981522703,942919839,830407759,998703491,488630231,539014115,543918909,582533104,796822921,306613578,3695898,444461971,900011636,499830285,699695457,669537429,438161208,588966648,492416906,182945045,843140801,549991090,629404562,568797417,25808499,826177208,729779906,490451443,170242583,962195260,435118255,447153272,199661295,179223009,957429903,464814587,801918862,100492634,606741840,749054161,318333821,962218341,879438131,215165823,68646018,717350770,640639587,681000059,283918858,157868335,167493237,76352586,655184883,305708806,576972247,807406188,345729096,405504196,848195673,322443144,189473286,39806578,648033014,201533617,347166262,675432442,392363656,137475164,452041289,398424890,152973633,280695607,20312106,709560376,480057063,716709091,873589357,148054503,916877063,740732539,232096239,627631849,951552408,528808589,912274381,822839670,382502455,911508767,970524885,835631198,582837023,662929239,74369526,857716626,938541823,377202340,570030128,317266435,344623240,821993249,677856204,715314463,464197517,386680699,165953935,752943651,3749093,279839081,570925441,474695133,662166575,162048515,310596741,892942750,717675709,579770598,312568302,96401057,130507013,153985765,699492569,20208684,138895061,562467010,541619196,684819204,994495982,133427539,250343003,56077768,863184545,197260971,984075563,971358516,894943693,457985237,600801532,69053913,940512415,720493057,262523331,624566834,36703647,892236497,894583928,910874390,505500536,526024317,568550228,227566363,160783396,553046461,588443103,937585487,640500262,430161731,781824234,551313627,448099935,156991191,658282180,218973263,412793052,545348623,329076388,458557991,904345139,206059553,125154502,160309565,696082636,341997899,772243692,730701553,778134161,889226863,112856181,551048228,440664992,537202359,396399680,961036570,111272159,196999407,727815291,937603507,58652859,958238123,92434809,432559799,142424018,733339303,893950653,90461183,862774311,122683299,833689517,533016201,567100932,453528043,608358868,169250254,163577098,412504217,315739721,347311869,641842894,494820667,915170002,391251428,528012841,251138218,86314945,43957580,346859995,530516424,101612819,51353220,407544897,859458963,941552603,53302032,931261859,635754524,65294597,585274937,366433658,607289747,313880454,495358734,932358823,75591515,948259485,158553149,161884732,824425920,134506022,780894012,965306083,859405093,614728407,445935840,736056887,267548513,743267673,753429418,736661834,678270463,566526407,511731177,723041561,670657935,510440532,793579947,118481469,499726192,354896784,109722001,284134347,830335824,513074675,265318553,69861117,406952359,23488062,842376602,755217383,332154547,929961229,241031305,271946276,206397784,228634389,965996516,617896185,671158775,196006084,188998818,966015888,586925364,71898364,445433755,106562595,821437789,962563356,444323416,776336879,172098604,673207831,807720384,635064240,585977442,77147583,787833534,807109810,19857961,461045338,641263331,665662662,932745394,862478753,798816783,185069797,794551658,144312693,333990894,100919860,766357875,835475323,256159384,18744716,123541594,303317336,580245448,70442890,926794817,64918290,69403609,333562088,307342436,615371129,204059938,254233249,365262141,493224022,331999280,143670612,533414144,497840117,772047492,37615314,111107696,335061334,60823085,126830165,706998469,794487426,122937907,629338078,645128310,178270833,166483286,867779071,972036005,547409195,555309175,752845921,393996565,46530872,410711362,961015340,251066707,385179413,666721089,488980403,473530443,414002081,793863878,829733985,281740158,52682250,220364655,598776060,123440794,43209754,277810963,685251188,82646451,221046452,979218179,621575700,356071025,576869136,821500049,373607485,980876759,82575952,256824867,761377590,869779219,23691180,977955153,26983832,251251143,583453782,797425338,345212001,571965931,179567851,739966589,18636717,72388597,200687345,301265830,204593688,815343422,244467894,864522328,462448324,478526293,344397544,659339503,351871624,663927450,383469758,428288483,6986226,905494822,831948315,531133857,558112638,132036899,938411705,681431143,178097373,341192837,216677786,567532518,785098387,98700390,552695927,626093609,910274985,157676954,46178842,602450056,343436631,511586856,53483591,24556390,209563553,914205273,457101191,508045696,387394951,22380124,206945094,469041620,558918515,745039513,166834550,714459898,929423439,163389524,115049344,897678930,140505878,205035966,831589566,456770558,408309793,924764968,74459294,70690224,364758330,952641417,999557810,38203543,75080495,541291205,307823888,95501418,114474493,250873021,845169521,17147838,569804225,524758312,758929285,959865348,196518523,152285471,894126511,212073640,106526792,799450893,918482155,683735943,122918323,974605074,317965103,2595626,959086561,450489552,778238766,177827137,690370558,962361383,995834419,599179003,185861235,270492767,98569232,663821994,623351677,228899150,327853317,359394604,702349152,760179281,627405997,793737626,469693222,61517391};

char s[max_n];

int ans[5005][5005];

int wyp(int n, int m) {
	FOR(i,1,n+1) ans[i][1] = tab[i-1];
	ans[2][1] = ans[2][2] = 1;
	FOR(i,3,n+1) {
		FORD(j,i,2) {
			if (j==2 && (i-j)%2==0) {
				ans[i][j] = ans[i][1];
				continue;
			}
			if (j==i || j+1==i) ans[i][j] = 1;
			else if((i-j)%2==1) ans[i][j] = ans[i][j+1];
			else ans[i][j] = (ans[i-1][j-1] + 2LL*ans[i-1][j+1])%mod;
		}
	}
	printf("%d\n", ans[n][m]);
}

int rob(int n, int m) {
	map<PII, int> states;
	states[mp(0,0)] = 1;
	FOR(i,0,n) {
		map<PII, int> nowe;
		FORE(j, states) {
			int x1 = j->st.st;
			int nad = j->st.nd;
			int sp = j->nd;
			if (nad > 0 || x1 == m) {
				nowe[mp(x1, nad + 1)] += 2 * sp;
				nowe[mp(x1, nad + 1)] %= mod; 
			} else {
				nowe[mp(x1, nad + 1)] += sp;
				nowe[mp(x1, nad + 1)] %= mod;
				nowe[mp(x1+1, 0)] += sp;
				nowe[mp(x1+1, 0)] %= mod;
			}
			if (x1 == 0 && nad == 0) {
				nowe[mp(0,0)] += sp;
				nowe[mp(0,0)] %= mod;
			} else if (nad == 0) {
				nowe[mp(x1-1, 0)] += sp;
				nowe[mp(x1-1, 0)] %= mod;
			} else {
				nowe[mp(x1, nad -1)] += sp;
				nowe[mp(x1, nad -1)] %= mod;
			}
		}
		states = nowe;
		printf("%d,", states[mp(1,0)]); 
	}
	printf("\n");
	return states[mp(m, 0)];
}

int main() {
	make(n);
	scanf("%s", s);
	int m = strlen(s);
	wyp(n, m);
}


Measured memory_bytes: 67072