#include <bits/stdc++.h>

using namespace std;

static long long mod = 1e9+7;

int pot3[10001]={1,59049,486784380,130653412,953271190,710104287,947749553,662963356,322934415,954137859,886041711,876626606,924095353,906117335,322139880,37640966,661385780,168649842,604450552,200395204,136318165,451268742,967759836,250155949,458529104,684872571,40161892,519544111,559995693,185444488,311495262,483597087,924190378,517248518,7525581,378029361,255581435,828049678,505093957,292858118,978888738,400685548,80758232,692807992,618833245,484028218,382044615,352313222,743300257,136568356,224796996,37723886,557728825,329156894,385297754,446916689,983384038,843653393,888854545,971660310,569243565,263034394,917822589,505678489,808887948,24107104,500374135,592090793,368991123,556669511,777724949,880192040,459406142,473089069,436239836,525895651,612078528,624746878,678140792,535346507,675670566,670972455,252217955,217920544,990112587,157740508,419191694,850165742,436547951,719778160,180272326,900503466,828791623,316203954,527149049,623976512,188799173,402288441,729986331,962557491,56888193,190884944,564979359,465936064,58450545,446207548,109317416,84052199,198264010,291444541,508581046,201975037,423876331,473294016,538155155,523525156,636720253,693956218,420429843,961625532,25641587,110060165,942637599,807193724,981874835,726726069,447347997,451689948,839552755,750282977,459198752,226917043,224378314,314970643,701368321,97696824,899720000,565908111,307812527,21779591,63059957,627374832,856195453,484950298,829946157,490281644,640593906,429290612,181170545,939436826,804750170,692455697,816165937,782076562,838586278,680783003,555262754,710131437,550929889,858787844,563045386,266765185,217298801,276810432,379084753,575423209,164830395,69926224,73572073,357308169,689923595,298075982,88537911,75070043,810938083,82527872,188279617,723026414,986421435,198907586,293963499,250530945,601667754,878957257,546705286,400207040,825339543,474333462,916401582,596636734,802259356,612380840,475968040,436597225,629358565,993644551,716681288,313078879,994596669,938296678,480151387,459052499,590823709,548948532,861639170,930993184,216137198,685315368,186881763,181146142,498464086,805608183,357264977,139479201,107282197,906406315,386119781,986788676,884121248,475207710,539871370,864303984,285593964,37862188,724323567,582008393,13357688,758113196,825797249,501414867,46274227,446810999,742495270,602891329,129836921,740294467,647675892,613479000,321217425,567596056,979276139,276327036,835034552,954915899,828525349,592990640,504056255,17593147,857729937,94695377,667277336,59137650,19070406,88396012,696076055,594683981,494148264,960636690,635510742,273541676,362313060,223730182,43424441,169798661,441063207,341127835,257387914,498827400,258936415,936262312,352874293,873981505,733527496,64808106,853824412,477351269,114885872,895808247,580806831,62323647,149005943,651866621,71833985,724950578,606380673,172109335,884051281,343726355,697394323,437090567,760710120,171561447,531812993,25203836,261301548,594999849,145837663,568102210,867163475,135676840,581669083,977441645,951291593,816881853,56200145,562338879,548233636,647745560,727304704,615165874,929439558,476076168,821447455,650430760,285678391,23192076,468886141,257546100,839552451,732332081,476748268,508280075,429938584,443268907,585506225,556838014,727658526,508001005,951134273,527293236,138074612,167706917,925672619,42096711,768670444,220730033,887627386,509149023,740448679,753740217,605762084,645047733,423319294,580816434,629371194,739374365,316573272,335007477,856370906,845274425,609172441,23216812,929522198,355885493,682329059,848322861,616268545,41058975,491397807,548902431,139421235,684447891,963232754,930492807,669375935,979309140,225003071,206246477,648135127,730846326,744401889,186835869,471151357,16284746,597959827,929577367,613559753,89601287,866359033,634181518,784194253,886121262,574033570,108037658,515622589,998044739,543380680,85548718,566213825,359918387,820685199,639976531,973914496,676671748,789767960,7943595,61337872,939978381,783031141,205521250,824206305,557763269,363040636,186365105,673008117,456022553,675543608,174229562,81334522,722155964,587219742,738302640,32284188,349003870,329375374,286323183,97514618,140637976,531786696,472392297,292550295,802248537,973529716,955797689,897342695,188426146,375417272,14339152,712580526,167185235,120872411,394947180,235868573,803269588,265569788,630301845,693384879,683433470,62687538,636405455,105449242,672247276,529122659,163672583,702285919,280940748,270112529,874613278,39091107,290761087,151306080,472655382,827456355,469964375,926185125,305063295,682380364,877831785,88709620,214314714,69458401,449091942,429897532,19189373,113278346,973006138,39040577,307015138,936756866,555793236,34562831,900593439,141607258,766919115,806504640,292153999,401366194,272223606,531598176,340474894,701875078,21190707,290048886,96549525,152861818,337427900,779927632,946419597,130392058,520578949,666144328,156148727,426116083,728408940,819196983,762310563,676119496,179839836,362401631,453759126,22443616,273071909,623041673,987491454,382459076,825820643,882807166,879980238,952709935,568558023,782465123,782724606,104936161,375327517,714396199,380859463,370273264,265812888,985113647,975334520,527668336,287354358,987366773,20170756,62962707,884859624,75571826,440722240,207367592,848854300,997209839,243370923,809531637,33298599,248958589,755618961,543715763,871864652,735475574,96865123,788607994,513111744,735159370,425335260,621591935,381912887,573906606,610940478,424032897,718359687,420860737,405485156,492809043,880976414,775906146,481694442,574906557,657046664,948190957,727427970,893899859,892404610,599447025,747131453,364859378,581260714,863660732,302206882,14050303,656336044,986790871,13733796,966914334,324108701,294551383,964493023,348116463,928879802,423044355,345943535,619655226,21183944,890700506,973810636,543842650,364415059,344668265,316237521,509246818,515145592,831849082,856099185,800421208,71580344,747703274,130317369,110268216,227841007,783528172,554704566,749688456,353328468,692560891,27766394,577787833,793511998,89641910,265106539,275911833,317712773,621401557,140282442,537859677,75844853,562693451,485355517,757722720,768580086,885180533,24927234,928230169,62865604,151024612,852251569,602545613,715652984,592756410,673009083,513063887,909251398,385424672,941297622,682892404,113281528,160900049,986926901,46169210,245662208,107618650,773619372,449977461,718908599,833565201,191209302,717994768,872758860,537563395,580689161,114027866,231412303,664984199,651691889,754084194,917259817,274554892,191704224,942643743,169990773,785084618,461283776,345498358,332398735,812765626,997113730,568230624,449881705,64612590,308800205,343177407,282564095,127128860,832001598,862016406,206401587,807225454,855499591,394995347,80081735,746336919,448421541,843389163,286337380,935833271,18432459,418263875,63381989,643042267,2558286,64228957,655655349,792432096,322509160,843255539,395973860,860295473,587029584,509662975,88800110,557658689,187696258,276261061,939276805,355670204,969728989,526670634,374049373,241271668,850624010,496814894,422470454,457663624,579144408,897908613,605317897,416249752,131433795,34106628,962262681,648652629,288821707,632857265,588379402,215065497,402443460,883703199,789832484,818021250,336453129,220675252,652864138,974214912,415936006,605046374,383088237,977148273,627968484,910752156,3683191,488743840,834806147,467829145,842989737,700631674,599428429,649056256,122592262,950428172,832735581,202978265,663486090,189854164,698451566,866232040,135371910,575857639,817487290,806649313,834949920,957480966,293165568,133503655,257268914,471996449,918121911,180343141,82058366,464420019,537509970,425996357,658708415,72925063,152014945,330424473,234569600,100213443,503554288,376943974,164564920,393893061,991196183,143000264,22529828,363804262,277716464,879367950,797716075,336182947,266698446,276427618,774301028,701082325,209919139,515152046,212951321,562465711,37536348,483797540,760739491,905889619,875737894,446540829,789227052,67867327,497763974,464694982,773800045,118537361,512580696,377306235,555714562,388941840,626549398,115143523,109842034,62220264,44343218,422661356,730235745,690204672,895391643,980757410,743897706,415334112,63807813,787523468,472936418,422351000,404024427,238222924,825340814,549384741,619344229,657122224,409933362,154923296,65641468,63016800,78997153,702854849,875688087,505487307,519782107,613421399,919936004,300719949,212144202,902896216,118285379,633295683,476523702,247882432,209624709,129355095,288951189,278639827,403029352,480039662,861803023,606348911,296595011,638681948,530083461,898069489,104884751,339618448,129595574,488995562,698738420,804673767,180934978,29441134,469509400,60366532,583323120,646671772,321197533,392993355,864456960,318673725,364655806,560537770,194549037,926005404,692718043,307434779,716138100,238370891,562644134,573236005,12622302,334305583,410232387,812050402,763852048,699266624,994591546,635788651,683790105,121627506,982551527,684711697,540713136,569744168,823140738,637097927,995228090,223075041,358003805,766533472,34671287,304811734,827954980,913271797,785963564,362165766,526166839,625458628,706266248,315386224,241010615,435705518,974952293,957546374,155442532,726007822,35581188,33555505,419000878,582671835,188944073,958488485,786154586,641823767,51352290,301350986,474247756,855548023,254856494,21008863,552342607,278372438,613976403,692366969,576866300,377910259,222727486,835228757,422526860,788381497,138690482,534214295,819684647,558381896,892346107,144903399,400747659,748350650,357222527,632849172,110495845,669105737,24387543,60016527,915878022,680942511,974050583,712472955,815225305,238697979,876863313,901406898,175547413,899117682,999632781,315672080,120521440,670460748,36431522,244927521,725086295,620333750,87347340,773043561,448913960,920238491,162274686,157866540,861255213,258716445,947253873,393555239,43145038,671331033,425890130,386110334,428952773,232115574,192433184,987002482,509151651,895629451,23081897,962926419,841717518,577372468,266624281,897058568,411011042,790849175,852607689,631075346,367845106,885512154,606815530,849980153,477703167,894110734,344362394,254860968,285194089,425643481,821733638,549250608,698924768,808336742,475944241,31290081,647980040,573114126,815789287,541270866,503142707,73497673,964062604,932305114,684291229,712498379,316487067,244688467,609186747,867971806,866813730,483584482,179877733,600181570,121278850,394763523,391106457,445017735,852050076,704585540,71260225,844996576,202466952,470964963,9905517,910869245,917671510,584614681,912056729,37413729,243268258,747266094,315275731,716509507,169582680,687601229,164687007,603008275,35381226,225999451,41488684,865284373,176583619,86045342,891364198,164159264,440312085,988125172,802872999,847386095,301173396,987735923,818108959,515581835,591561807,132897026,436433345,952408515,770008569,235672605,231555233,104857706,742638257,46130629,967492760,479585337,34366280,294453517,185603624,708316863,402150512,585416866,280278458,162550592,449839822,591463344,318755381,186360915,425592807,829484633,237751157,967971427,744392824,651556691,770777548,643113261,194682964,834260771,263921945,326821217,465907547,374550226,816140262,265993494,649717264,154453381,317630829,782690336,81326945,274741691,221998298,777406846,96528119,888858938,231062560,13009932,223469292,638130943,993789447,272645129,422109628,151249297,119676036,750200302,577322712,328582258,453616828,619889077,829851552,903951041,404646370,963334879,960871890,523835444,958916239,44600350,606048719,570557729,863103891,421302904,515004157,480253823,507795821,835224341,161766476,148574460,173227129,888668725,999175207,296385143,246186500,66536741,927991813,988182265,174157528,827798891,696372499,99405611,801882856,380432494,158180958,427323562,28835907,731460529,12474577,611292121,188200257,36897802,778295052,544203849,692854663,374709103,197668165,107393381,471710282,20246840,555646795,387368285,709700854,125434497,781561511,425339989,900834656,385229793,433887628,630366432,507182614,625964450,574549316,562323002,610712670,972198403,343096898,528588189,603753777,56528516,952317925,420759694,438997091,339045005,268360105,395729223,414725358,117493119,851135272,686324522,776415896,581921982,910874591,233347457,933891947,385192388,225159797,460759988,416340963,517352099,123880008,990541194,466555076,610489881,816730833,138620228,385785877,270091513,633639501,778632644,478673717,204117278,921064258,922989933,632172210,136566987,143958915,629912335,693209050,300906919,252535655,977787718,386556023,746442352,674134716,980566442,467428351,176504992,443199654,496185856,278405851,586980626,618742054,99290894,27958765,937102935,990821477,16985824,995914362,746750089,845696703,544265888,356195546,990648530,804638498,98335811,631263097,454353828,139001769,915400232,467920997,266758443,819190450,376543446,513787216,621105218,641760957,342484628,374657211,133497478,892523248,604902238,872001636,824243734,767908276,215472116,412888623,660128867,949194630,993314534,229507588,193468948,147830484,242188613,995308937,997009516,414498180,702859495,150029734,105700953,535530010,511339136,64430306,545112366,339874618,256177799,42747262,183056170,283706667,594862419,30733649,791227103,168878000,76952196,950189803,757284598,897914290,940539070,891155671,850848532,754614381,224271756,22827343,931767378,931518389,228967026,273823634,11650883,972985458,817907271,606107207,24215613,907722034,78010466,439974592,59501148,483263661,235718637,949698787,763281017,980457343,25241542,487803128,286703644,563356053,611340742,59221665,980072113,277795433,542408396,673151208,905402956,138774603,501475189,608227984,253975811,17558760,827211988,40337490,888430343,922956587,663124270,824745138,375312862,849033111,555820501,644533809,76621228,406860504,705732528,799754168,683535664,97141002,78986946,100141706,267556203,926120361,480813887,579014726,240316244,433792626,20593369,17837569,290604510,905590877,235321655,508308830,127892565,928017828,524341986,869714587,776288278,46206749,462302605,506331559,372018105,296928376,323551693,403786222,172455977,352914592,253597135,657119797,266621439,729241310,969812770,473854868,655904672,514705818,863634338,743667590,827214526,190203852,347178131,521313919,65387550,69412923,763661541,450018858,163360031,246402997,850468010,285170957,59722020,525534298,274545378,629912045,676084840,133437706,363046441,529144550,456314235,899073907,414762820,329586743,767451180,224410601,221485692,508535362,504380542,166416077,702861991,297416038,119504928,646444080,876212723,484718254,127980092,96399609,300471997,570826659,743151349,343699927,136847358,699585982,852361955,120728478,895847526,900192488,465851827,84339967,190676523,257927814,379382276,143858710,712907332,464752596,175849103,713610366,978206975,143262441,503819396,31306154,597074610,658399098,808065663,469000482,9267760,251956411,774009000,457121072,541991584,60819588,335826675,229193265,633010254,622226800,870056013,937152012,888769229,933835861,73370195,436614231,633545852,248752878,608590206,642822542,28016852,367082170,834904605,281675545,659140281,574180322,773596450,96456290,647428345,996076302,309145079,707642093,557657062,91623535,278080345,366176965,383454931,630062125,538158697,732676714,826982145,468338281,906961191,150992474,954534821,326250681,776327521,363466642,341593224,738142786,593065412,919268055,858999728,74583611,87615111,584653228,188218511,114778241,540305370,491569802,705035116,618273267,417887527,840409098,316480427,852603114,360926171,329322195,146156433,391151807,122889864,523528544,836778265,919424115,74186598,644394642,858949108,85523252,62471998,908984086,600918496,636021923,458268335,286723995,765062245,160188773,986790671,1923996,610039013,193426483,640314720,943636617,798207193,336209526,836161810,518373072,411314265,695863976,71631194,750344903,115867098,836221915,67513189,586269359,619137265,436105072,568216271,602351415,248455359,40390894,41883111,155804128,77889872,319019535,784390356,465807225,450636490,633911747,854486586,578063522,72671640,187640323,973355274,655172101,257121140,746089586,843655329,3173402,386213389,514247426,796045319,679712596,348800252,305936176,225130169,711256230,968831284,518088460,605260396,20873224,542995352,332315807,915950189,942331666,742156133,577190756,536712470,334419186,118375885,977584442,383311583,165506129,971342917,827504441,309394568,439717949,904988753,680501831,952337445,573396167,470028177,693629395,121858649,631314436,485870418,162111652,530871944,457201827,310493544,333151318,252038878,643602848,104305524,136843563,475495027,505652784,291033410,231706795,54442181,756323371,138421559,654580180,304778256,851112572,345912229,771067246,749490344,655013064,866145397,19189438,117116531,613990614,531512301,269642054,93535192,159513747,127180670,891330267,160567659,359629924,787233631,358351524,298992556,211315659,978260952,330550293,664114731,310476314,315737055,957230194,485329845,241816799,40064198,750811147,647108865,131101908,436511305,555868520,480007719,975600830,253007414,834684713,297272928,669002601,934309928,66552282,845672315,104178883,658819210,615258976,427019514,75105681,915326331,104140876,414543881,401457823,682824392,97240968,981879245,987132159,166448768,633232836,765471227,310166723,34698222,895296542,365138496,62899377,145286475,21002222,160198198,543327489,944673387,18438489,774329345,373172844,483111111,227793750,993049600,585419934,461440790,617017981,294505031,227453789,918692651,881969170,397154777,592262916,532682080,343921742,234801202,776079850,738741868,968258185,677165847,965819608,681633582,781101775,278389114,598677520,308631023,353149559,128163420,921734611,506663950,999374131,42648335,341515789,165683499,444863970,772380654,304918790,149504675,101492279,17540720,761968035,450183764,900894362,910809366,381876460,422928697,516454342,112227286,908964632,452179257,732759693,726809081,349123550,396359645,640513777,697753326,635858567,812259961,138101348,746440974,592765194,191695492,427027875,568814370,919499021,497310964,714907681,583359871,816781557,133821683,36504153,533715412,361142583,108234292,126663571,357151626,446216051,611411063,211606366,144218469,956316376,525291141,916367790,601252940,384605539,572313441,536141051,592698893,276687771,136075413,117005992,86773245,873308144,972234087,450201400,942282519,840074951,585434364,313517853,915572213,623226996,930629204,723482332,907923228,958314895,535838746,741891074,925721977,956637239,471930295,11794386,446694042,836301426,762558200,298836604,2506074,981162597,669784701,116532499,127485284,878482227,496659012,217794299,535471631,64117586,79309212,129626607,321463165,78297211,371979978,45567167,695625353,981181772,802049269,206953661,406642849,853422524,746266925,315345863,857733947,331481867,672627472,979316109,636515552,606566953,171756978,77722928,461143349,53424491,662746981,546207131,984652655,754218101,824334204,110071264,598022443,626989523,104084466,83589812,894774243,523905062,69789486,999329974,435221663,403798594,903010205,849221798,697599087,528199919,676798708,286628944,152395781,818409283,249413585,622677576,487927848,651294875,310804669,704771317,41206221,186126798,601218172,331589921,53108069,978344436,260196974,371010178,779847373,207205934,303111121,408458643,74241674,896577345,995274318,952792199,426164924,612421128,854934138,5561381,393984373,383078429,397995681,246802862,462096227,319917121,785945699,307255388,123279011,502269586,516576108,302387771,695364794,595433486,751668701,284814654,20386320,791801259,72215406,247479046,390084963,126818949,532067085,29082239,277118692,581529367,727351617,385331590,444898639,819550421,632470878,772613600,60147046,622894397,290990986,726612040,714049625,916011484,561740093,190519367,978023240,293894503,176386169,426820376,316206003,648140450,45164146,897638492,654943080,733660209,901377994,468795131,883496652,593438765,965389198,266353667,917572594,743723839,148661699,324602805,470898276,72104882,721147419,33646450,789212148,187801038,463415239,206256163,220083734,724318001,253341659,571517578,541227093,918390851,60981089,872299161,392797333,289553959,871605312,421708019,436639624,132977095,164427691,290657896,57980763,706050426,571313037,463285668,555218240,81624265,831190252,952846788,649590764,684754937,93991875,126188025,276636068,83064987,904383035,913459901,893316583,450540324,955405655,748127190,162133078,796055811,299254697,690479463,121525283,946385642,125383277,757071752,329570920,833118860,835219782,892562092,898601580,524325993,925343937,633753433,506203263,796267657,808549067,13523075,524050089,633488753,877114055,707471151,463702974,196720059,122682579,283556663,737276286,427107269,256950641,678294205,594230681,727236753,602727303,444265717,446139502,91269190,354362587,756253295,503863,752606084,636343036,419669739,78244744,273856116,929680494,703105934,702006147,760684039,631504492,708487085,453589320,995569199,365220242,889918903,820935411,414744814,266350456,727966255,679090600,620558707,370833142,326048679,848311507,945826206,91247144,52568340,107886932,615403078,936098456,677341419,333170559,388200680,861792866,6588218,27681959,591985553,154674405,368876914,812742319,620858694,84765379,310829536,173142786,908298953,144500259,595733967,494771144,741077551,888002686,670238569,916983849,978920579,280864743,782093319,828070364,726581564,914472315,675350449,768383855,297936291,839924115,678719463,705290148,677657730,11018665,641145035,972906709,167857598,823234925,198746048,755306207,75904943,110947833,358544960,721194843,833986212,51487666,295168354,396013343,191727119,294570584,98292858,94931414,605026051,183035417,58262777,358694993,580493397,554359514,374713048,430616470,471759041,899417017,675065070,917039403,259328697,100121962,101692754,855388918,859865419,192771113,941371863,66749178,472184135,792441,792848287,898171351,119733947,169786913,747355562,598271628,341114483,468965673,953831140,774591606,859422528,40500636,522038427,846860148,244529210,205220217,48508807,396524495,374741357,102234597,850676001,566831432,828993878,259159365,101236764,929635597,51982995,543850272,814486537,615186655,156536813,342206136,929983222,578891480,962763246,206515104,510290738,157577238,778261534,564999481,654120035,133676340,454145409,832068329,802415197,814635986,440000593,594834190,363839442,355060270,953736475,184718056,416412395,735340239,105468764,825001847,533722498,779563797,462326829,936734528,236756681,245158509,364696609,969914103,457467143,977137923,16811334,692454422,740878462,131996402,255487140,260024258,172303164,329459818,272656904,117411596,37283673,563591570,518383977,55243603,79490713,847079086,172599081,803062632,45025028,682859766,186040280,492416825,720895893,181287781,862105341,457924367,975757710,516614471,567684544,204404009,852242958,94074674,15386141,536233553,54849449,805091335,837907642,608006119,153069517,601846067,408161517,529248626,601897917,469852146,299174946,981262699,580707657,206198163,795241762,230475632,355498705,842884608,492869395,444701634,186602253,676360271,397362713,870675696,528813220,891609205,631577509,20067883,988414979,915686423,367213237,574279832,649562398,9771010,968365458,11529175,786249815,265000946,40750818,295035240,535764813,376221385,496407360,357995456,273533371,871911122,479482583,966845383,252621130,25000951,281145267,346754876,528529599,144072888,359903963,968962430,262128558,429112996,693123438,245603966,668486820,477957869,934009027,298649259,939971253,362129869,406484900,526692086,640768514,739718334,627598613,70239624,579528547,580932263,468957766,486930697,770525889,782901075,525254072,727480423,991197035,193310012,762818690,680510509,464764660,888216239,280329575,180958304,406818101,201877795,681833515,586945408,539154386,527116062,676127163,632568519,538216967,173461916,752606190,642602230,18813655,927506325,320601549,200734384,164557845,976121393,991731791,770116839,628907793,376008905,949675931,413657080,36745938,810877779,521637004,143233582,799724319,920982077,70284092,205319458,908590581,364841912,549910887,687739166,309728864,179562313,974946123,593214044,695838960,594461424,352380062,690135389,804299804,98793945,683617474,927939664,908835985,855702610,383064194,557433173,871202072,610789427,504622461,451491010,92462870,839972417,530904240,364248317,498719977,915715737,98175609,171495262,623654956,201239062,965288864,341731343,893931561,764375994,637753761,721569683,967913218,307209604,419779616,566371675,680802974,734530326,280916363,830202678,637590068,55661789,772955659,258388797,599967254,466133457,714309725,274656272,178091802,142742686,812806618,417650317,833395906,194508917,556959538,903529153,492582033,476263015,854575881,850843942,483579471,883983201,323670463,417035903,552863872,58549206,272040895,742696414,480243301,886482250,890013835,426575037,829183497,455971619,667941863,298792200,380494299,807704382,135718860,62908042,656946060,7625396,272005254,638131019,998277171,268257750,351768870,599859233,87601470,779165826,962537418,871597630,968093608,959058644,453473139,135197372,269563347,445965584,821585285,789154374,776304140,982841987,836084118,930738199,159528038,971049929,526856148,328465482,558110853,887528112,647118639,708246834,267008119,562308469,752553560,534853381,557073595,638480897,658223046,412371185,105932615,214939350,953589313,494949181,253984287,518058084,811587986,458649853,814980223,766851066,788279267,102111254,567395243,121469379,645310367,931594255,708778432,657338204,163336291,844579751,589367702,573191791,401829837,649878924,700314658,879950778,213126402,900823610,732974546,413663787,432787581,673691584,814065156,733060161,469143887,477189549,565481662,126425701,311166094,46555988,84516169,595228351,638652170,771722353,432903314,507609452,830321337,644285310,403003882,976061646,463731209,863968567,479555671,282618660,349137524,221510364,965392283,448519832,647374380,809497038,990262269,996312870,278248813,314043827,973810722,548920864,227871445,580861620,297559287,578215073,21606576,846697299,628458679,856276508,271166958,137590858,602517174,36358480,931870498,20651220,433881247,253574763,336075576,926548316,751128507,386899372,20857306,603053377,698609210,174952526,771635464,302194788,299911704,486085533,864437203,152042639,965727472,241094953,415780045,395705348,4930490,140501973,500945605,336822585,36682442,61502496,660860887,174243302,892667782,139490341,765088057,684361554,865119276,427770936,445823051,405154224,951605515,353661898,381268821,542453638,344646045,4168748,160398930,396351273,146155549,338952491,805500961,25913141,145052199,187238796,263587612,584792040,384928243,627661804,801604962,971069807,700632163,628303390,686616410,12110282,100036813,73729488,652506441,852564906,104781993,271861348,140625681,805779248,458482092,908861004,333049527,241382161,375125118,762937732,709821518,250522984,131578665,588535202,414899634,408316573,685150307,440194844,65161405,715776916,910817029,834368947,651606527,713543491,29305121,438077819,56953055,20921154,373213901,907485890,133943508,230148529,40393791,212948064,370143118,580821790,945637638,956495396,96243044,55465375,174905450,991844761,440882320,659931449,291859225,995256394,894397930,302998879,780680834,422244180,96410289,931115317,427968666,121581737,279937860,50579430,664741168,300954468,60256535,88110309,825599727,837938373,422640924,523746584,711822134,384896342,743939669,893207285,996602771,396612843,591602374,528337795,818238576,169336012,122102595,36081685,587402655,539132300,222959855,556385740,21331282,590862005,810289022,756125156,434024108,689373896,838899962,203509386,25649795,594734357,468800667,210391909,431747580,262672962,575624568,54877902,485212518,313774825,89511729,578048726,198982643,726004264,825484853,54743589,554164237,843801559,637908616,865602515,962550451,641183240,228873733,764965319,436805441,924305065,289401132,847323852,625786517,67783669,557842767,57318003,570735459,357882584,608554692,545756370,367666548,341840882,362099923,638203560,281750645,93720146,80862416,844768966,762324160,479008742,987008370,856832163,82038822,310366370,823653848,935730107,926701472,794837088,334880774,374685508,804407024,430027683,704475723,586676241,645112315,236821784,89425528,487965912,898935997,271315286,896210874,355528386,595517963,739951039,368596060,228594585,281555179,551648396,285907386,545117740,657203944,235417607,174178436,62395369,384118293,800924590,795783859,240761161,705696377,665073783,941537470,845676858,372438490,120242066,173705534,138005367,78858940,541515468,946646107,505580957,49720915,970289290,611884152,147038531,478156245,647913367,636140177,441048732,486393567,53536736,290701937,658557758,176779933,678190651,479470577,257903089,919395765,400147462,307318242,834744836,847475934,606076472,209344612,589907461,445420758,650155035,4392978,400956109,57114609,560523237,336389927,488660382,906694740,417327487,770607369,594213560,716258831,367415661,527214524,490209759,395856569,934379263,160714669,40423351,958436497,716315195,695653476,641816785,639072179,572833619,252131556,116146028,306759366,833676143,742223418,550302693,823491499,349184069,969946055,344200777,711538805,654602340,613304089,992897863,625501884,260489771,660380112,784960530,134011513,245775746,811923970,298168929,576965279,222521188,653538239,779204581,250981392,200112468,441040220,983768486,544923184,168866777,414245276,769131304,434051984,335423806,440181852,297996804,413156224,461700204,935155162,976774405,551437106,809444267,874187511,897975706,567092426,240428472,60743749,857609599,988856871,8966942,488954455,271411191,559305177,411165491,910908113,212788021,919764081,148838792,781767292,576502174,876634239,374816363,531263863,599626697,356583304,887370511,340937253,3711473,158767644,70544931,607601464,258596590,869936027,852098747,578559398,353653361,877167515,864230670,956475613,928076691,143245,458473949,428024997,447870935,330655693,887879289,383769165,185265458,739952869,476655730,44003748,377297466,37913881,776743503,926787592,880136933,205392920,246448184,518715152,610796045,895408743,990495303,756737438,588663674,1042706,570746167,990179276,95659241,582482273,995497619,138492850,864242411,649769915,263442259,1842799,815437395,762400305,975294819,183364001,460819260,916293270,200921488,212861864,280119353,767559517,621602072,980492600,107132121,44568647,734018286,45466613,758012249,864977888,78950980,976385393,580667679,845537262,129434342,968407264,480131655,293897638,361504784,495840994,914649760,153300177,222088309,92466343,45049587,133044143,123545015,209539670,107887219,632350141,643214536,174870397,922000178,188129621,865912673,277070060,709858420,429549168,448643684,960711079,28106768,676532019,538910295,113786701,990860323,310803264,621807472,109157109,618084226,255205595,635073672,464995428,514835773,537347077,807327670,891252133,546833128,949149249,313611879,467713445,11020479,748259921,999765848,173145307,57161475,327913650,972983316,691424313,913972548,164609069,847341,34638359,360446276,992002543,757751575,472438967,48367104,29104104,568225070,121923559,464184998,659755039,875025212,363381705,326148346,733548148,284288047,924769801,731597007,71363943,969440716,504438376,581455922,390497840,506792754,605121471,817490962,23477234,307180764,716806470,704950748,636427270,393603170,873422643,733285489,774536868,627198387,437294718,815622435,688827188,556339494,290551249,760582109,612639964,776981011,951397386,63852661,435752999,778657841,966531363,710054283,995063378,496996223,129766498,581886768,831523119,608310131,104673979,893742711,612972421,408234264,824886201,704941893,113548375,917948447,937467482,516957126,801119499,304965316,896818435,231397623,798144886,657043511,762009460,896288575,943694707,228363575,640645787,492811760,41412540,369057345,467012361,612711657,10380933,983708433,998853615,306699268,284949362,974758963,541603281,131915902,502042675,117708560,572710790,999201991,877953552,278929154,487499256,343366042,421272133,698007392,638201696,171683309,727642182,542904156,947283245,127942453,873854319,223321431,907086817,569082099,728628630,791671702,422004169,924000855,326104968,172120640,551600219,441103734,734206644,167818078,489618459,480183114,332500108,798739861,789722041,296472585,409549123,465994746,523563942,926994753,112786731,943632206,537742054,130324375,523965510,639183417,141326232,172614953,740288353,286650306,413800512,506262050,267581192,401695808,735600559,477104339,533916407,229696254,334007505,809024691,98644455,856382527,531482847,530412822,346507038,893943642,477746956,479807374,145429002,437078989,77040798,182049259,826619448,51443275,673924216,550752026,356155627,633471513,859109302,544818695,998895865,801519504,924860400,81377316,249098849,37831638,920376631,319303490,551649032,323462550,139981250,752773395,515890205,800501811,831106863,28809755,187211088,627457934,763285416,240213887,389714175,232158491,726639103,312092698,761595206,435004297,568553751,530207795,239867799,953564010,832341,148903366,594797390,190836256,690001668,908208531,805171623,578833719,552033978,54138743,838613035,260757082,444827239,603451849,227982170,119062096,497657494,177157504,973380476,143324985,196980024,473355759,184017534,51289104,570280900,516628382,389115176,861866792,371844564,49505937,276053452,680173048,538030211,145706949,849571280,334161558,905700225,692211665,406320467,817087939,225372275,7373319,387110586,492832708,278370985,528178206,394667778,737459994,274880884,441205699,755137887,136777333,564679785,776391064,115617221,81235040,847843388,303867564,75661035,708424446,754819037,309003816,366203262,936266477,598813378,330910009,904984668,439286666,438159061,854211885,357244285,917637307,564961748,426024132,298794376,508984923,50507842,437541384,381002964,843863757,310638290,880257816,343413138,202243816,295007390,891250177,431333284,798908633,755539799,869278860,47044830,950147231,243450584,513433991,763522340,230339065,291353978,160926494,548477692,59008199,375118363,364061737,481357634,686731105,784735295,834110096,366713933,90878139,263192249,239002414,853445502,103094833,646751208,11813862,596732359,448819939,368392497,208403082,993502883,351327612,544015773,587155016,916297094,426724864,676317957,898763348,76564555,60376548,174757897,278987720,945762969,357165559,268945761,978130129,605583022,71615765,839277889,519720655,984742279,46425635,387301928,791386389,574556951,13162110,209427951,510992037,568581602,174781480,671540280,781716149,556559188,263262164,367413221,383134964,736330875,601533522,952691945,506266520,531530222,327859176,756348111,599293812,700057079,670168512,780188084,325849633,94844330,462802970,52384234,236611815,690966138,859197162,732863800,874223282,10217464,331027515,843596413,524242546,997882069,937879920,871008420,175832556,736526570,157127493,221269211,725548884,935751422,185330893,603824156,212338059,349958125,677178477,711608471,768309946,933683785,93434534,215759547,385401623,580277228,789796324,682809424,213395543,793330407,366875028,603376731,792339423,850261225,74723576,352408340,359922997,92901082,715952623,286139595,256826883,370508112,133352342,322387640,667621108,358530338,857780372,72831671,637310779,563925747,251201510,197860159,444447010,151309782,691254780,903218501,148892211,936105802,111115366,251201007,168158512,591905585,432644008,195849563,720764639,430870391,465540065,675105762,319861290,489181001,648725854,612684704,418833250,684406133,497464626,788495056,844235831,281235762,690394096,80689335,624509067,635639151,855964668,857326931,297594251,642804295,950549763,12562484,802112529,942393380,386306091,988207789,681324197,512227036,494037042,393088854,503577369,739853936,634761055,5274321,443378552,59933781,29809496,220916984,926896908,335137368,526304509,754734402,311391736,370490355,84819256,492212488,655000464,122127997,536044376,884136860,397080691,217558730,625357848,755308070,185913230,990241431,765849815,665409381,758263632,708892550,395891937,22824274,750545997,990266627,253648405,684562006,701609340,329627657,183381945,520394509,775146845,645730008,710975489,391356087,185419500,835978864,715594795,156754170,176919538,921726240,12364771,127357669,342944141,508440159,882738637,833411345,106166421,20949746,61542895,46381417,776273267,159822217,342025574,267977754,818285185,921550839,655111199,660918970,603986348,789613404,881566421,615229244,671374660,2020832,328107935,445318197,594030588,911945280,456461777,611281402,555254033,195165108,304381624,430389765,85055587,447321609,893504950,573423230,68071250,539213117,995122860,9348813,38054973,108084948,308049778,31213792,143190907,279808258,397710988,435966024,357570975,208354977,152950752,588891631,461675508,476881065,349810072,934796943,824300821,138838511,275178653,24167254,52171457,672342833,171667910,818346638,550289008,15405934,704990403,978015351,828056949,934439236,702060325,959840740,635459521,248992868,779759618,25360974,540143247,918368845,761548809,695307865,233832986,603893665,316774972,245190693,265129611,638290354,406849516,56902116,13024164,63854653,553378607,453136011,228126240,626251470,522793177,414092583,752762410,867236947,474124940,603386088,344860909,691673000,598691106,110870730,805689948,185406427,64031287,983439603,124711050,62739902,728447270,82545132,207465350,621366400,64296763,659531815,693871327,407701219,349112213,726921139,966036350,480031849,400453186,360014592,501494202,730926614,485327966,130863728,372220583,253051714,450555392,845155980,615113685,847731318,686246183,150576313,380644100,653303568,922116800,74542050,633479643,339177665,101800389,211127984,896239954,72673292,285189271,141145399,494607213,61115995,838363499,525905923,218629849,873863238,749979462,536941643,866855572,954312726,211763117,400208205,894131628,578132193,127625491,157565307,73747915,740602357,828272376,655188068,199956516,232230635,986670131,884157592,621284552,231254246,331876469,973480809,67888260,733836684,322050192,741654296,944217953,125516412,618560311,367548564,375003715,594212034,626150057,534456982,150109205,798384004,776722195,668571507,478640497,242509512,944073855,616673673,963462086,472317977,904028650,987380183,812017846,841452818,947102280,442140245,939144256,528784359,187396023,547684672,231970548,628792973,596002774,367555575,788996254,439476323,637215177,918723291,691230516,470453572,812778575,761739224,939123123,280901849,973165499,449148203,752053300,995000851,804839428,963051304,216051827,644243224,917867689,168788368,784272270,492947060,30742184,295210311,873532222,203815811,119739494,497331716,940292522,332742917,136368397,417418089,120564825,232301592,176609989,643167465,395374939,494609589,201416419,438042280,958410665,190961434,81637334,602901626,737864474,159020236,985849841,446853718,265009480,544674984,512905082,531975016,592499900,526350198,452624142,2773869,794189440,91914288,446754123,384024367,254688251,86428026,488471553,756531196,410279900,617645518,349937085,434787524,768324965,820540709,107986577,499340641,565304014,636489026,40233186,729383489,365340478,989734418,827239388,658280083,780348977,826420327,293547430,682072739,712883286,44860349,958729565,21687401,619332689,975696771,918227488,414559372,316185875,459602185,49232092,105780159,212565069,754671524,598508742,342458971,859637032,706747248,717955028,526151614,726437610,414132625,117202447,687244463,98011620,488108871,340521925,479008576,977206236,50625643,393572584,67349936,946343032,609305408,874785146,187724569,947997293,291762511,284391443,30200156,288999163,111456532,396712001,446783074,93551952,149174980,633332364,642500057,985600227,707396737,69630716,624120307,679750072,561720562,37233355,592364009,502122595,836904612,380088062,819815937,310925050,813148937,631244808,374406674,339538270,395164887,91249125,169544409,427736964,439810437,366312623,393924117,825021913,718599725,594864501,153673667,276299165,189279880,787555888,387304984,971840133,187611815,289986389,406164200,589677919,891195298,190783234,559105611,626992841,300009048,234151347,402792221,477691341,195797260,632324813,147621471,900180067,732404205,735598316,344657432,676559711,174095189,146743301,45120094,296411958,829585428,189595070,399210065,954963181,620480146,731884688,58639193,585683223,8392839,588746646,900456306,44040797,565003853,912282263,354970804,670858676,533681833,378336226,375652694,915772739,464086686,854529793,129393644,565231076,329573092,961373288,130885736,671770968,403611763,870826563,437358640,590152585,919747736,183682894,291131884,46497979,659142756,720326597,564928515,463648729,993607082,504174321,989272339,541936706,820328594,582808033,231299719,17011625,519437597,270450549,834356118,894066913,756776186,876694312,922066919,129118902,341990830,216379312,981904856,499436084,201117679,797744146,993747419,790933778,848330201,49688198,38383164,487435174,559388052,304851331,166118212,114231725,269082310,41211967,525422352,664246073,66090016,549327470,237548971,29090390,758427091,360982971,683305374,498746890,504901460,926102849,446747806,11011834,237781316,748830204,674406477,27781612,476395508,678154982,373251810,145974410,642875757,170309366,597682542,556175514,607696299,858508470,66290172,368339030,51230220,93239605,705397110,993656826,441507756,591301554,765217741,342072014,10213293,84734136,465961643,568864909,903776411,92919570,807650528,955694042,777091034,448145464,541318502,316000850,534061037,769953068,958394084,211869972,709889058,238692416,548373726,919919914,350621546,851524833,689511850,984945652,55397828,186322675,167559061,194923731,51311249,877920998,356648022,708903665,52221565,631170104,963210213,599469305,62743159,920769863,539259697,745625259,425610495,873943338,479804327,965506706,205083510,976097227,564753664,138872100,258575500,624592624,569596409,98119603,864396996,777859517,826297816,59395440,241312011,232837796,838919768,373033873,277012588,316194313,957857647,535801783,559262901,914809988,614603286,709180977,427217741,780211727,721945133,137860107,501401263,242971638,232151833,333490861,301713345,871184200,555465706,694244001,413728091,229874449,856243990,351011590,883232828,14895494,564019053,760827469,100902499,191621745,72341300,681393803,622391702,607354141,654420868,897564038,258508862,689685390,232309035,616111696,779282444,848713651,692027094,507587565,537915881,394634828,791795458,729672164,411310434,469647257,200684469,217127031,133963772,426717458,239001063,773670303,457402059,133992828,142445188,245847335,39182796,704904813,924011476,953264397,308984430,221479355,134341849,751786077,215750029,823373248,366580819,230629609,447686515,440839190,113148093,281696790,913636279,308261028,505314958,342746076,812900058,935188842,965544711,449240741,216329620,47641962,210194447,771814026,846102256,491764817,220475767,873474457,792850354,20225627,303040365,230387627,158891495,383822581,339426821,814212935,459262269,977532355,307626341,27682554,627119708,791378482,107656508,9096393,132906498,995745473,774023598,319118367,620321082,339314615,188560883,331502329,880888103,561229942,66613178,441520191,325575862,928940670,17238859,937377972,231481171,731570703,518139061,593198824,797113187,736249687,807463345,902725152,17127313,350698260,381409784,866177769,930723659,300955585,126214268,826258968,765459909,641850148,609123952,159989872,241885599,102635370,515920710,601791542,188514813,611114920,724658485,358581235,863197304,937247106,503974793,207343544,428843955,806521541,290141141,544114985,445524362,767867589,812945474,616958205,764792035,204558595,980391609,143714604,203592194,915379359,235391227,616465830,690540863,747133862,507108419,244823923,607728035,732487520,655265716,784993240,65504289,962734092,485000572,798575562,88030453,110182811,184761197,963845290,100130812,624276404,897121762,142553520,642743561,364267818,650234519,697843666,970345192,912841329,367258807,265142741,413603717,885714179,536189671,463661252,733077702,504922389,161939356,356965510,456252444,250377169,521348793,124662362,187762211,170719730,829266210,340091521,64082955,34383307,299880833,663183868,343947412,750589025,531026978,611804430,439534188,54085534,696674815,950862976,507476795,997058200,289239675,313449522,880695022,159990050,252396321,750254408,772227885,284062172,587077017,310534171,732135027,840906706,699735016,652670558,543509569,696315230,717728458,147419775,990233047,270782999,465196028,360065089,483291534,881591407,90627544,465808199,508150216,761894549,110908978,64196079,714242341,295698484,699659496,193290106,587389303,750710059,677963595,72040924,944491505,278488348,458345944,869457808,613745212,40769701,410057500,485148009,504582912,116162123,257153014,628217398,608874837,449998342,951910761,378132826,365086178,973573823,560271911,495841058,918428896,307500280,583906621,101822076,491723640,789015115,553199505,877342090,172709768,339019246,747316928,316972576,913509212,805081801,274934476,605759686,503448231,114384223,273936649,685073576,909306060,613161089,548890919,459649154,822704559,881164338,872630345,948881216,486531374,190902223,585287023,613179207,618740694,18984254,1206599,248463854,542012149,275162266,56531298,116592236,654895376,916786734,339477021,778472714,34967210,778768842,521029363,262640425,654347269,551616715,415176031,729282914,426487345,651058624,360419468,409016958,42183878,915794592,754484476,553511467,298386095,400400322,238448277,132210013,869002995,757492564,178098533,540201505,358445459,845760336,301730877,906431261,859156128,309847148,164114180,778146990,801290874,424487621,569356974,959722393,647187567,778376278,340517888,240627763,828677931,602805095,37805490,376363386,881424353,226255968,188560912,333214750,997635025,350178862,711477499,34544367,810312710,154877854,382336831,607375687,926690615,153742095,316904109,870601357,139169637,827837694,987650832,793570535,546193202,162159134,334636541,952971196,995758707,555478057,423558193,687563387,930154770,708629262,848998937,537879989,275248134,126950795,317441483,601998459,406756662,573966312,136520044,372021729,510921952,430132465,891747999,827224359,770832669,897953169,236305120,580933209,524818120,984950957,368652773,577440501,283904870,298551282,154527415,689264467,377226983,875963249,753528133,82414052,467322486,925282656,15171685,872821300,224582927,397163596,113016040,484099249,576354106,133366963,185743062,941991269,642053820,635751796,507539224,683428193,751085972,875250178,647398948,260212856,308826389,889316416,244680793,156044721,284665831,232537056,80523627,839617445,570162759,540520522,196080159,337227745,960975121,619522721,196896255,526880113,743574760,345695891,996524775,791027074,357365663,84886773,479023793,875754862,448484254,546529072,994946631,603202669,514152455,188102775,280683226,63696056,188384417,911361572,989088330,676389342,113976178,179287612,754126886,438179704,73160378,47130282,996002344,941999172,108718060,692680007,61447029,385590025,705226849,939915107,46764736,410876737,860273286,276909428,224699515,281568359,329914209,103990874,557075846,771400196,409854754,513199539,919366290,659678201,337818178,825453093,179347363,282363657,291465482,745126148,953605266,436957871,925144072,831925132,346775600,752261068,263493392,21195295,560965698,463269334,590711881,945617009,738373582,221338318,806248099,143664595,250610774,315490340,388956257,477858824,85500857,740069657,372870293,617777238,127871309,672872291,435633135,700808554,44015472,69587935,97945052,557335067,78140913,142739439,621074515,828779524,601770110,922976659,848355791,560752101,850580172,908224853,768969394,873428464,77009711,346393010,160704312,428852865,332648124,538936582,666007757,91767804,797020470,261403589,620418816,110409539,572822778,611981354,886719394,893129793,420777691,501701937,997470545,637799412,417215561,161489037,766079068,202569680,536950593,395344115,674483227,559792334,177298981,327455786,936572169,649620160,420559327,607526192,813860297,636341154,308539521,950048003,384136454,873313472,286847152,37359882,63656776,868939718,21049012,923100894,184308250,217778069,577106368,553685493,574447299,538321211,328965830,103159695,476787418,820048411,38282178,524312902,152333478,139479457,122398741,523206720,833393022,24211601,670817446,99091577,258489316,535513643,544884160,864538622,140733128,150417102,979393831,225921895,461884475,816173364,220633478,186151226,43667130,500341324,654634068,486810747,687598388,996928805,648594376,849040338,982567624,635223443,308823144,697702411,629378753,185725749,919675939,944141876,633245674,523542282,647993420,363189739,990748096,683911190,271575622,268791226,852992977,381946297,546733682,76962430,554497262,508594644,4923332,717829238,98377953,119706034,521552190,135051731,669608001,682574276,328141389,420743429,478565113,791159731,190628800,439932408,568578153,971121486,752225413,158101311,724247894,113593444,579227807,822536129,935541338,780080868,994852098,21123587,326680034,129192636,695909768,775602988,580517826,996867528,30248824,162795874,933496542,36922704,248733236,448749755,224097509,733716317,214499258,966596987,585085831,732992883,496445293,597901159,465290656,947753826,915279733,352575595,236163422,213808063,152223712,657906972,748517692,220885515,68683934,717590381,994111065,263866278,39740555,640015773,291115333,69177987,890925775,275719719,973573271,527676863,790865181,797745976,101807082,606342941,944072488,535953690,529219281,869105026,782321041,274826644,238387960,570551508,495760062,135696120,720133796,180222343,949057320,885296400,866757675,173592808,481647842,823223178,505097452,499234373,290284924,34357289,763543965,507273683,3497789,540941219,37817137,64107082,459058523,946534885,938033128,917787549,436601543,884332147,928582677,878110356,538048487,224886466,320837881,155902554,889846711,558070031,477029848,135297376,174699501,830762344,685307471,720571817,44924190,728476746,823073449,663749794,761311555,685696517,693348910,559500003,915445888,163862120,894256155,931326967,925689432,34887541,74394089,896530617,236032660,492442781,253571723,156566616,102043469,564758806,442502058,303839939,444432424,290021075,454337800,192564404,735412206,355048119,236232076,267758081,846814299,537191630,628337830,720263956,866040134,803514600,733283278,643979529,346941739,562602809,133036094,648259621,82092476,478581395,752595542,13848478,738771703,729985086,889041486,10339335,527388145,742356118,386104937,110265320,56835103,55973555,182426060,76341536,891327715,9874611,85900858,359728538,610291675,112864816,554473336,95788277,201928981,704315608,132045669,164654202,665905844,73907109,140848793,980319645,894312403,252715091,573304005,27954274,671913876,842186199,252516641,855030039,668419495,502483972,175854931,57747931,957553756,591342250,168275824,519061824,81430826,408810818,869823109,184403807,860323327,231780416,401688582,308912485,973199085,432367903,892125537,120465560,370802649,525467536,332316068,931361978,993053957,842696427,380969603,873930082,697050790,151810590,263466162,413291039,422391083,770885480,16389880,806017351,518226041,729280809,302189200,969945899,334989133,773176057,272670208,902999492,216629861,776572652,838206963,282611722,939455569,911505570,492026169,653049910,943865663,323144349,350530534,477357280,469829411,956695945,938460868,175406627,585845224,574389825,144539006,883705556,929010977,168796874,286543057,80854353,368656879,819895695,20555157,761457202,286006157,377446477,836864364,3483924,722226841,772435687,554562386,354101692,350664545,390572763,930920953,950968914,763009715,960345657,450303244,956068833,908124639,851432950,263912618,776071201,228027067,770185035,655813369,123355006,989698313,695275257,308363208,538941736,970346303,978444768,184701200,421082458,497888394,811571513,485935683,15944609,513210254,552076318,554273389,289117958,126182438,946729312,418752967,943775301,987358653,540692883,373824778,979161611,513563213,393952162,481051104,586441261,769778393,644010079,150888675,825307712,594744757,82910260,767908475,227222867,282979564,660157673,650160110,304066653,831667319,123175868,411778621,115621224,317608187,445702885,309472139,20207893,255865406,596253138,151299306,72657456,350089314,423757682,467189264,58656827,626953282,964089678,530997726,884503096,22950101,180504464,608020130,980405056,937746507,993104239,811798224,872993431,388746276,78690839,615319589,6156523,536524086,210532447,730375886,965390525,344711690,880440332,120800345,139521974,632985060,134546301,824472141,255113121,174576481,566554413,471299059,737940088,623951294,699701505,673879533,912265580,369856344,647103983,842824697,955184784,705915602,610090717,246495958,339722057,247603373,731469937,568007569,278707101,375491750,412190546,439380381,971936061,852064252,541664157,726582805,987752124,774761801,909267013,307474800,79338108,835906504,442809183,439263938,96093396,218900686,866517139,970182649,314839785,974334335,467744684,855652183,405400292,481674742,411641264,4827787,75992568,285116423,839543882,226341200,221425245,939200487,849168657,559676199,319643415,623880217,502675760,500744466,459765858,713959006,565050188,648317657,509060219,496661318,353961293,60244050,350883551,322657966,630100970,831917088,871785451,58735753,287454621,907796618,482121054,765918370,713513548,261200928,653489511,901864930,221878792,720697101,442819057,22313757,605027874,290681744,466181308,539863403,393860601,74465650,122136071,12805995,181193463,292721794,929092918,7330948,885145428,952012110,362689885,474869453,566133917,641430930,854720445,387203515,980197194,663703353,19016960,932463186,18284687,692475110,962484167,727179352,213255675,534264931,809689790,372075033,658469827,984542356,241172492,994380428,169481953,739772648,834785978,276869871,888898243,551983491,72931901,555792007,961991617,642594605,568565037,196634802,88342021,507961517,619407375,385830350,896177676,395219698,327783843,308009822,671851969,186639777,892114933,494309971,509273263,76696383,844688071,985555340,56864288,779318613,984456918,196144065,110813111,403345638,156411543,945137962,451127475,626084809,681627858,443105299,924617503,738552468,784377662,716239226,209760023,119511425,30085426,514307442,339930075,530858171,643919957,829274739,843720442,848030918,377326457,749803433,142605292,699828368,165012764,838633235,453546875,489234408,802355776,305885378,225559088,38494079,36854960,248517808,727941874,239416938,330673003,910017472,621327983,795811351,864136262,381777656,588651343,272909494,32598401,902967181,308697636,286580568,295841378,137407239,759998920,175912941,483180400,319239883,795719317,429620631,668462343,32615503,912823172,295106121,721216954,139618637,340838505,172740863,175147887,307507069,984790282,880954768,497731499,547078721,451170201,149012362,30902145,740747337,389196333,654106450,331495682,488389400,905478734,613389697,47964613,262413213,237705972,299842376,392336489,77176792,212358909,581129768,131430427,835229603,472482314,607964093,671476264,1635386,567907242,354498120,759341356,347416578,601370724,339632906,983326016,417512336,685755893,199442306,868644562,592382494,593643353,46105919,508391977,37639733,588578363,963513509,508794683,817026166,577738426,876078076,533947607,72025040,6557189,195450552,159564261,109981835,317329457,986975234,900184513,994936059,978936648,229723117,920240785,297733092,841226448,580180241,62810996,926476848,531014603,881073062,482873856,218123353,965781144,410372860,106840516,825585128,975882029,857527053,114598145,905816743,572482998,548312274,291240787,477111184,938106812,268754030,656606387,950274566,762454950,202027396,515622901,16468020,420106176,849412982,986823026,912454384,518543663,484542154,729451269,367681670,234779853,515442756,379085992,648584920,290672994,949502565,176568216,176513602,951611544,709668319,204275296,251869070,616610326,222885104,142413969,402396618,117729955,836064138,750939186,207683720,515896439,168613270,444910538,522174465,879767954,417552103,33957455,153746260,562843194,327529861,310626809,202316247,571985481,170431144,788551615,183988194,318791458,316671674,145547133,412596359,402232050,400154193,704777061,380383677,275585946,74411443,921266956,892104051,851738760,321687182,306276953,347671102,630758295,646300740,412129119,812177486,268035108,204981503,952685926,150850589,576367512,924977857,17095660,481620277,195537500,293756678,37957800,370116513,9823152,47298388,922493468,316410628,731041991,298224390,851881847,770831389,822370449,152303081,344567018,337703460,51469953,249233424,984350764,927856568,2100309,21145273,607216641,535183424,45782562,414484617,901977915,893530015,53486401,318470543,366961972,737332952,773177882,380434633,284486769,659105095,496482222,778521666,925533844,847571799,266808815,793606657,679161166,787410413,797151772,14655331,382634164,164591878,985735996,724420362,297656306,307089962,355039207,709987395,45393887,463614703,984405822,178976382,376306742,536652818,812028266,456743391,240306369,850683758,24874518,815403106,737669158,625805836,208551293,745214159,150566763,816726157,862507111,182040929,334741278,137586260,331009872,801794913,187486322,879750288,374392476,501160575,30586024,74118534,625283534,367140712,291751135,612650026,371132042,975794660,698475007,250399635,847943620,222466890,447295658,361124358,32066274,481400175,198734593,78899912,960871082,476123852,637139950,476644196,362932589,806297851,81470422,746915008,583998664,536869148,586098345,520931649,492726481,5772904,884205916,474768407,599468705,27313759,850143907,147213043,782915263,363041277,224215514,701793513,204859057,722372121,351074344,588793746,681664185,588178308,340665975,985016970,266654382,674492503,107530851,589176256,268497014,480068708,576940263,745351418,255573398,353472865,219059281,231393224,538388335,292570878,17654090,456353116,194958055,78109111,264863155,904330122,789000185,671597942,186599559,517282265,252170,890386232,416245336,870673418,394299598,996799328,3107052,468312267,370860512,942219802,136698839,929687614,123534807,606767485,12970962,922329783,650975133,430359444,294630872,658238949,351427425,437873568,996135847,825217763,283346291,315020142,624234751,437553779,112915312,536211619,759668697,676575154,85988889,557871022,725747491,663296081,970012807,285839597,542245107,31099110,371333538,873931880,803220892,390119705,178299293,394878661,189890170,824569846,24495624,442091454,58084511,832266036,476815756,493378959,533946060,980676244,951126607,74623602,449043656,578657539,148781228,382670677,320648001,943678518,272419321,88373127,344739697,534225661,490835574,349606245,899016504,25173094,446017204,869694644,598674078,105384365,841325331,419122466,762321598,327725204,845435539,122792957,801267143,23195809,689316058,423623921,568736031,293659438,296033082,457336658,272129207,957431667,382108938,150522021,174755813,155929604,487122147,75456855,651799710,120806374,495528395,455991535,843961740,96436415,473829477,156591520,572599758,442873465,235051728,569389519,881472084,44723766,893640054,551179270,584486408,337664401,745075083,938268102,792767177,108706989,38948528,871613779,921675902,39956230,375408757,511536924,743613841,653389846,16746380,856985704,148481268,670332763,479045313,146489328,48268522,207935628,390811826,47351935,84390243,159424026,829245383,110278005,805871668,915790637,520945681,321302042,564145254,212870262,776012855,782754141,848948369,551890178,562892606,245259028,300242998,48664799,607696040,843214779,989136641,529105560,153993739,176230560,238264598,286148819,801494859,469597802,280416195,295782649,669518546,400346016,31733304,819854785,604860588,412610800,254958652,53336563,470686544,569542105,891522735,525610514,775023934,387958418,556464126,649946168,671005586,208570360,871101435,668275256,985315324,884159609,740386385,75341832,859806632,721457578,348225115,344671701,519129885,100364787,440266081,271634990,774412237,267862517,13655614,350345444,547977947,549565904,316838139,975138855,973845835,622308387,687686741,214085060,508619453,469869966,351428119,478853574,824493201,498685054,853547524,127391869,362419927,534119623,229397754,707881131,672611826,55435455,408159384,403297109,290822643,786126303,971740914,328829126,30925255,105369713,976139390,54436630,428542372,998347100,397495243,696439610,62243022,388180353,661503850,140565223,235794827,448642062,864933601,463847938,756699239,333050937,324641251,741096116,984247364,822190010,497560647,458439043,366860617,752421599,742688348,3954067,483700652,39600014,341210320,128044644,908130636,205549796,509819045,304577477,995313485,265564361,309842922,914573113,627371509,659975626,900466884,668661119,770139450,964064725,57548036,153953978,828383292,204666903,375870652,785974590,13240033,810703150,209969253,474333611,925199883,127508843,269617604,649787156,281506061,651279635,410897916,110872043,883221285,333292894,611960046,628503309,491633357,457894283,199327601,95429059,990465453,994124802,75022384,996721813,425923852,377360698,771700228,126444196,403277342,123601067,519354197,345763984,17348297,399582385,940086707,179573066,609900013,985615546,611968361,119495737,103724721,841007461,649216969,612534136,527943481,534391351,274664314,652963860,862699248,527538565,624506635,492031983,996360796,108231166,942076404,669190400,23652995,685691983,425620744,479136532,532880024,32316914,281441430,834883744,49854363,850260186,13371665,583441062,611028881,644141609,917603596,574360923,437904822,841653279,784123785,725056358,852583851,223465291,401875894,369498696,528347378,384105136,24016897,173741027,233831510,516737341,823035125,400755932,236863020,524370078,528519081,522995513,361830963,756384632,755822327,552274613,263394760,197074369,44333622,856027159,547357962,940071898,305116432,820067056,139250776,619014470,185183166,880692596,16737176,313498708,785079115,136337129,571073971,346677532,961443778,293249718,102476970,162559173,956539291,688198885,455675906,206385045,830436903,468341995,126269170,68167138,201303587,775425561,103630973,305281844,587480174,116551696,261048930,678159672,650191620,164700629,407373746,12159169,986765262,501547969,905814176,420904215,972817564,903934535,429983583,100414837,395668510,829683449,977637064,490588040,732971184,215141049,863713480,416923513,916346811,362463976,135169003,594402280,859986034,314966199,438954565,827927252,275961132,228769403,604383191,222795543,853926522,506844617,667579737,915614180,101336358,810561661,855185355,839673916,904718817,741051079,324857565,514221411,259885591,984155544,400310865,956101926,862233182,6807520,977245673,379341042,709032265,645922916,101999897,991875799,273645168,473412126,512432496,626244498,111103549,553418981,837180323,660546789,627070633,893548828,164375231,192947377,349584722,628104884,965035700,392650412,614015893,24211958,691897939,881114026,901757078,853326093,52112841,211126670,818649568,438002452,606607107,542810510,417580626,718212075,704519812,190087581,481491901,615063132,862627242,275656299,228685712,662513367,751534143,339299368,288240787,330112423,808329283,35497750,106625078,104186750,123357686,147949626,277404522,459504918,305713051,49822135,947229028,926482848,885308603,587332615,403340368,845223320,591473317,907651058,886948677,432061562,802995954,107755834,874197332,477895928,276454939,387578743,137035205,791763408,837151728,972040648,27821966,859258840,374887994,761002754,451306394,191072763,655503413,820763295,251467200,886588864,185463872,456101071,311952955,509910855,725866132,668928441,555236116,137184182,588706218,513223348,325263917,508900491,64882709,259056924,52198197,251313079,785897998,490559060,21731171,203907398,527860222,618030695,94253597,580610298,457246614,955121093,945025771,826361165,800090520,544784772,995776652,615112355,769196148,263025312,381539571,529970276,214608466,415220130,333284744,130710696,335834078,666333012,297750166,849429067,936626184,839151874,78660969,851525973,756827710,919134967,286465,915471673,686440578,629406591,829531804,23151515,73799666,796447135,406545412,99865146,936964882,838929936,973444105,900553785,800078233,819249716,876141459,276650346,926166609,211712018,382863375,699272126,319479137,923428665,538857896,19678171,976311252,202715798,165072312,354883059,489604206,638557724,194780534,595671659,815546080,180140821,135264770,249347821,739379168,600185619,360368251,384704346,406767942,240039025,64288007,142498771,409869881,406433755,506631002,53827686,471008368,572927348,786735242,928979673,320326992,988418210,106473735,167534006,715451050,668755728,356706249,147149760,46117417,187337372,84401794,841499025,675579402,287829454,41310274,330352353,975955755,210973592,779546809,459202424,443744971,696609165,74296147,113153494,600620439,36054249,967334305,122976105,615973318,608199978,600249531,134307911,747781129,727577236,707907830,249161063,711506103,723581956,790620762,365048543,751264722,430258851,354714857,557444378,532846110,29729142,476093673,855100193,810943013,373639442,35256217,844343066,613355235,13017989,699227085,659853149,668322560,778569199,732309940,169344366,615397941,632763743,65998859,166597812,434131929,56096076,417168540,384946029,677907311,748527036,772639371,581898818,543063562,360048069,478277561,811501802,369570872,790267974,533270078,64615399,474668846,720491258,287995834,865882831,514929816,90492142,470455557,929990840,28726755,286144123,524200755,530165324,731997741,734305748,19810132,768476285,755835326,319852557,973506091,560765071,616445695,501589255,343711169,800676216,129547631,658009376,795371446,888186099,500592729,499847808,513007987,608412319,138773149,415617943,823744420,283916093,961258209,335585914,12497074,939717467,376320460,346686993,520106360,760236663,214399250,61224630,253151565,346657049,751943118,488863975,928657713,308911085,890530485,934240677,977350018,540808905,224807807,676102625,183624164,823184142,200060702,384309707,103729792,140444933,132790666,155981747,566114133,473205521,312613935,540118602,463106247,960587688,741991665,865519894,83863050,29204786,513396446,546527649,910919904,909034780,594348481,683208904,802289902,416091580,791535437,375692240,250924472,839043416,674324576,191609498,349168204,33133670,510066138,895171936,7278851,808869696,946344770,711932570,906031664,263353036,733313914,453004679,473103028,260504820,549008506,403043868,337194939,23813634,171264224,981092192,512439884,62498503,474077817,820820082,604682742,910982423,600719183,866788670,3816549,363400326,425699768,145424673,181455868,787474534,583432673,115666820,10006370,866138000,582403992,373082878,170708812,184569228,628267886,590140728,219603743,381329638,133636643,110077270,952670737,253955335,808471450,430316877,781092110,707680536,827677755,543412884,987162707,970277613,922368986,965873066,838275003,300305654,748438922,569595820,63339742,148399178,823000388,349570833,807973330,16829200,747423849,630550663,385838856,398448463,983126998,665698538,832695206,818874911,744281168,58381589,374424732,405845105,747437397,430546508,340572931,490861849,901118713,158511467,943549370,646359125,859704963,718004839,467441332,943020061,391192201,508115156,691636623,450665647,355603426,26554888,39570536,600563912,698191454,506878657,677607683,55793383,543449709,161642111,804945631,234232202,177199081,428460728,177350572,373852724,629344951,189751465,634178357,597540364,160706848,578601129,817827166,875987097,161728671,916227036,289870050,536462638,582089523,804003030,574586145,737038609,392518194,806675267,367507652,959191048,271796879,333795728,303804702,363722825,468943086,620091384,775877511,790826341,504282830,396620231,27856379,891312063,85639670,936838438,372538229,9730235,560642497,378573618,393412804,632500786,538651078,807282180,205113137,725541936,525478970,7482327,823923936,884156307,545406587,713330328,442243225,20010227,583885856,875669605,414143696,770933926,877077720,561925750,153379483,905028275,14236388,644469132,257509083,653735632,435063754,79430116,268886854,499730707,598311087,671128960,493681637,406779156,902214511,864287121,289850684,392919711,515852432,570043948,524849832,857512831,274803274,858412844,419670540,125542993,188141766,583062771,273323776,495536051,908070679,665148931,378951687,718009031,714974740,543126734,90291469,620915664,448786888,416764012,497972325,767613097,785447471,887390426,516898081,314571315,121449410,466160893,334378075,690812467,785078346,90928448,233888369,874204411,895903799,223056837,283075816,343741979,619975892,956190452,89604914,80529749,201115416,664116259,400703186,122264487,595642330,83697966,281159740,201371046,758812024,90891527,53740254,308236235,41313108,497697219,522879015,482740610,350080355,894737698,365959371,534746916,270421852,139826972,642811836,395838265,853546374,59485519,560386847,282696873,967536933,87956793,760633506,647581396,33584731,144766938,342862126,665536459,262092398,293901170,570065852,818259121,382497710,107119688,310412437,543864110,631606592,737389943,138439413,708841019,353037939,537114089,49619349,972918598,869891159,202688229,537150445,196404779,505713992,905304581,329829270,88427898,578912455,201316007,508814134,965588258,20647523,215577094,611734503,310414793,682983554,495597843,556826459,45347331,714529480,250969176,478769891,883095769,921698666,384147659,534957510,705786874,8831094,467265959,587419854,554716044,427452871,664402999,332413327,674408627,154736962,62805179,582988815,906295967,870180778,304400441,541514791,906669934,952558007,597361614,605698175,871285220,520595644,651967376,21315938,684814156,590814585,10185456,440987137,849270440,569860524,693846133,920020727,303528341,44882248,251843602,112750401,798382050,661340449,491899644,181875234,550617293,400306766,714060075,533073527,458475484,518665212,661889006,883641713,159145691,393842080,980819135,388697203,180979283,645607065,451314331,659744676,263100425,816887080,364849268,984275331,473613379,396220809,442386869,502044727,238877108,454251557,100001532,990421740,412915879,269568397,744163034,82687072,588880354,795779942,9466228,971293266,895662563,978312378,367204146,37465373,292794793,239610834,780037830,453501250,795123804,265173739,244004605,227819789,530626497,963802029,545612044,845360637,699904794,677891610,821398694,771142492,192691363,232214141,12715925,862650075,623922109,976356454,871848682,792463051,150370941,253632956,772314012,369775360,865079802,96870724,119341436,992405042,524914858,697233077,915675583,727122084,831637571,366586230,550143748,437948257,406446573,263521077,655966853,186431659,602955235,903422294,182664984,184564714,361720700,245464787,450106105,315208099,722907567,968624981,336102697,528016231,830206073,838061423,688620325,341286291,614056195,404004742,75843366,474887588,636987525,476100434,254330475,960113156,721351793,101726692,859393866,348038212,308236531,58791612,585872691,196288694,651010876,540947837,428603419,603111375,123333084,695226142,408171594,124285392,928060842,64275651,412889334,702112706,52886381,887889815,5318932,77613470,997757956,609131432,601676392,389022512,390150291,984372000,181821118,355121630,576983087,274065773,309716596,455149188,104214080,737166849,964961905,35129485,360945247,455740912,44924311,735621675,723983016,472812534,107124733,608314642,371044018,778065519,990509830,614542254,105302430,3145544,741226361,675084313,53319296,451087468,263711480,899073523,392088004,404386132,596541322,168276203,541441395,572709558,926453623,159601585,313926697,57401394,494890583,793831013,927158519,783005202,673849253,124261867,538933124,461816315,791393552,997524938,849651648,79811555,792478211,45553774,904782103,478026065,960914603,45995360,979993635,643748046,678102170,254756043,89477806,574929513,12575494,570340012,7132842,187184311,46302868,138033394,733825256,647238227,769798597,837036068,142433350,546825280,485732697,29824379,99743244,738773733,849854556,61325963,236763840,667890300,254048634,317684059,925868585,613692968,955813773,847086804,628339263,804881173,428051788,29852680,770888986,223415674,472041682,589085307,898049555,927801999,779855456,684499001,981227123,479980447,365216509,669488986,654857590,685561234,705023099,908681441,730034017,778368084,856670389,529445966,254627493,498728912,443318545,516580466,559723313,101677980,982998999,107485636,919275742,312909384,986086484,420386127,380239462,759834474,465541157,739587270,888400533,162705904,620858047,46560676,361337881,640385817,141843335,707029790,401777467,557482815,802512509,560812232,401255563,739573736,89231367,22953100,357592415,474365530,809984900,798025304,595846042,112687770,100084152,869050085,538109953,854392279,9329514,898468336,656401093,827869244,850646768,840652029,661312948,867993109,124734563,451159032,489494088,136199984,472798922,303349752,499380464,916812327,850718071,51022841,847717125,848163733,219919336,16780562,875398608,412041955,665230485,194633798,931057658,23262396,621211793,934908090,387419975,761943643,9860563,256380513,12806164,191172744,559281440,9519385,110160931,892769091,121685440,403496265,50785203,815430961,382479039,4615816,559317080,114025731,105342688,380340172,706659222,520107789,844617684,829273405,764949076,477672541,85676067,86044870,863493070,401933514,771902055,44126635,633651880,509600208,382471555,562693107,465042661,303897169,823806673,959893469,749054221,902386219,3472736,61586629,628830369,804199164,156102627,703957204,968648027,696945944,960759185,868717948,925752380,751903972,177331835,267451618,750480738,136787957,192016354,373607980,177456593,634286711,995735668,195048153,398305878,563625389,515362094,616075589,647200215,525228023,189313029,744971175,802604652,1764197,174067925,536831379,355876678,161812124,844043198,906449829,955577953,922151722,136651214,117479003,17599588,238064539,472865012,205898134,78829460,800750962,543224157,843022161,615236436,96055061,955257292,987440466,371668685,664026943,126682737,488884753,155577821,714687927,607106016,2887841,524122019,880883295,277322350,607330525,259919691,997726430,747552672,237419934,409584633,562824722,236776740,429622393,772506681,746687064,124133499,958931148,924961891,74319333,482263601,183176110,366043678,512990924,600859239,136955351,76464590,157543305,774551831,510748567,191921670,782612506,485543310,846711500,467013521,681208497,680257785,541665289,793426273,27666420,674423149,12246533,145522056,931824600,310420239,4564401,523312766,95303227,560211734,942449413,694998687,977181397,583907546,156442401,767271990,643420368,329044081,723802966,841040161,580119255,461648710,894485977,502086147,684686674,63130016,764288695,482835145,932277535,55778865,686176334,26062740,978723494,643192662,883232585,546587,275415539,12048570,456004953,636281215,769201538,581299422,149329403,751856028,346286600,877300271,703339658,503174525,952318748,469357021,62539024,866802332,810543987,811553336,412602017,736331292,626156955,941776984,988738946,45613666,441344783,967908947,55011325,363707189,545652929,259578981,879141780,442603836,313729019,384713256,932894532,488834466,186180779,788742220,439022762,854891877,510091613,399445197,839272551,204517093,529740025,618517265,825725331,254728913,487478450,114792555,385532749,323136346,877961394,741991412,850580497,927415778,973891788,335787063,890144298,130284668,179306881,891942060,286332264,633738587,629561816,995412766,128008088,749535406,315879081,343723405,523199773,423179619,333147415,21570631,724181008,164042058,519415040,938482270,439173318,745073058,818693877,54404572,535549544,664802295,910442670,728844510,539169731,433222960,382385973,509161624,484525121,723669659,969395174,815228839,447377145,172850186,630561672,35909290,407650370,346529633,228155783,370736063,593630850,307816279,243331439,478040935,838973226,529675294,796216474,786244121,928775947,290510502,354512520,609646949,42439508,10490350,444672817,484987234,10980000,358015464,454985756,453717982,592931581,16681385,19095970,597924641,851879267,618484969,918678841,66502480,904914038,268655824,857640335,803786921,813565895,252197575,14501931,324517627,441222589,752475490,924897986,300793016,526677457,776940700,571073161,298847842,666098736,463986740,952818481,978090735,279406730,687884284,878801590,354724666,136656012,400796105,609038483,113130926,268002614,286243311,381152925,698910783,982536484,796437597,843336057,150481207,764729948,538383360,998802110,265380544,455632966,670821006,309306017,210869985,661657108,190296802,835782646,129118190,299947942,625903181,956676163,770353557,606868877,67128,963841251,861631908,502179346,187994383,880244067,531548444,403850047,941258381,365750609,207559662,190395646,672421960,844038105,605713272,762747966,504329061,126514529,556370631,129159948,765716070,767900932,781816267,468426928,141477852,125624270,987467311,956839083,390616567,517503328,53801166,905028902,51260111,858273257,177197833,354767576,670448588,318395689,946908161,979607498,842744494,219277865,138559749,814561434,37779573,845990467,890736205,81800866,259302624,560537399,172641858,329001684,220302527,643825767,267449464,623289192,603240780,764568880,27479091,612833105,181763836,972676840,594323115,185371977,29793251,261665986,114699157,870474289,635931361,110672832,120011023,530847525,15284303,522801533,907506027,323013214,607139975,8132818,234766722,740070344,413436956,38643953,886764730,570175236,277274888,804746908,499837859,925529493,590649600,267986261,320615021,996242512,123679299,138875530,461113570,295004334,710796433,818278420,522084354,558803550,790592978,724431141,934145477,355885253,668157299,20072473,259449882,255974978,66370117,89011300,28216908,180188830,970148197,280483651,278991965,196425967,756844197,892675823,614303350,998260239,268440089,118704404,376302733,299925377,293462503,667218351,576132413,42617097,496943141,995327508,93608481,487155880,67356758,349175303,452322521,192355566,403737228,279409292,839167822,20374414,88763865,417427698,687966666,743376273,625237112,625968055,787420961,420000617,616259633,514814294,269033613,165702835,586635427,235086443,619275540,601105491,677889601,702769253,821329918,709988496,110406836,413213331,833811426,730549229,201121255,8903363,734678112,7531814,746081778,382600737,190760969,244379633,372848007,301811231,651254572,930952843,834041510,316779247,497625168,268339544,181622741,641158241,752707796,642334882,232181715,97993065,392454683,56414249,204965884,30399595,65672590,900739771,782365470,898314651,581455591,370952621,381164101,358842400,284729277,978959889,602080919,275937167,813660132,816798153,113798880,710018087,857725788,849701083,998898856,978135063,896930788,865729878,483208182,959739194,639269809,242687405,448477535,149778841,290720301,742933587,485071680,997431826,351481195,612938277,392065222,59131821,674873792,622264858,117342834,976956370,296288314,528530921,222135666,888849822,692771883,486632918,186973837,618023733,683154466,587780461,848198640,281142765,199014278,594019365,249238353,275403278,288048788,992763556,694807897,711222764,992697464,792141417,158205008,847452005,193092958,945997135,184433595,619274925,564790356,305497994,350921433,559552170,995855050,244435822,690752247,229147587,935770053,285472805,883544453,416039993,745374695,630056964,233406808,438509118,524727531,635761131,58761632,815583685,400678452,661746535,470871690,502228182,71711326,482059336,121532209,355359009,593975560,662596929,685786646,15376189,948577912,576733604,542344211,883091171,650191364,149584085,790573341,564885935,949342330,714851771,281930302,702286269,301607898,644644339,603307156,684005276,827259801,863647313,509828358,854500814,418212687,40781798,124373246,115751646,18896809,837666836,388652723,554479784,476536229,987589255,157510283,824635767,917064732,754980811,861596679,421942139,261191406,91224933,741031015,140098436,672489460,829845577,551133266,867996233,309203639,165551505,650750320,155376698,838575984,72932597,596890111,763917724,577368720,45308629,429215096,722026296,930454066,381758640,465775566,581204213,527333204,498145030,965670572,881206881,384751931,216614586,874599184,206854508,551757394,722130246,68597567,617705433,887857899,120711062,867450149,63489747,6044360,913411148,14500700,251828308,209655002,918126445,448071307,162421837,846985883,669055176,38811075,755151638,948760132,336642307,391446897,547659155,725217229,351855460,712912108,746770620,58031708,714301710,801378544,601313416,955652842,344272248,931829856,620781783,543247775,237641429,488642797,868318082,314065107,230373428,320454751,532459345,191642818,316680870,688561737,881723507,891000395,681956071,823754603,885212060,886565050,779271000,172956895,931621371,309951102,302493884,961231289,745986848,777079209,749891046,316065294,339414765,102318191,786818072,820008308,670240152,10458409,558588722,105214490,810376526,923148817,14113456,385457513,880525817,168604075,901954990,539831697,521653021,89021408,625084200,596667430,614827446,945604726,13074715,48840631,990399738,113719788,39714607,107812328,210111510,874467148,410260800,489809625,768344171,954635796,288723414,828753950,91650991,899329682,518020690,603509694,643671554,161326090,144221728,148757060,955574459,715834516,312039401,614460674,288085045,133703128,35950007,811948489,745991353,43094947,713507595,909682238,826095657,122108733,398524447,469906179,489769542,401483118,176468833,308046877,859912650,981714418,254262699,958008160,423443857,936136972,951672689,320219396,634982048,54689887,383114860,549209786,288426504,296515479,942396915,595044306,770979042,541132383,325860096,712674017,687735259,79024421,313002967,512069009,162700782,318409069,736983774,154566300,985384818,987710787,333853302,703491807,487420763,708432920,255200256,319811061,523208801,956273991,22499290,560565914,856424086,985500224,802319632,171618336,891051533,701603812,3204785,239348142,268338027,92045408,189258947,551483178,529949774,3985875,361931230,677050673,164910124,777843917,905133423,223120598,48099077,202377893,212120107,480110568,48731382,539355579,407361435,285206937,184305026,27404093,184276231,327088152,228152250,162115946,784428350,709314917,336240745,679612527,439825913,280154940,868936266,817211871,543432894,168733183,525653226,297124801,922251441,24958403,768728436,645099620,487194736,361764688,842912185,121263654,497454926,215719756,35782878,943148238,959915825,69153651,453909318,891130968,392161092,720159416,693057716,364785616,225688404,674474514,45298397,825025735,944285003,84751834,511010838,678761844,207845796,86322093,233233878,227165618,902483391,741382129,873028882,482092361,71625420,409395977,422876655,443426305,879700664,444144921,313256547,485714324,944917116,410392112,243651857,398403284,315352241,234348462,42235772,980083377,942923369,681626335,353173672,552011950,753407385,952365456,227417692,787200912,426327307,200974825,362358356,898413672,428546578,246707187,812583194,224686632,520840099,86790566,896095866,564421043,497934811,552448925,556343978,555326965,501726748,462535270,244967046,58997999,772818570,163420492,816564565,320661166,721058596,788737165,140530067,159868197,57098573,613613480,262126889,330560215,249998902,185060864,658881847,313911161,140016137,812815844,962436391,906054349,602879594,436896913,325635151,429896803,976142659,247467811,726669455,104347932,640993541,27337559,255510093,615375948,334099093,217204461,706127814,140997014,732621411,561395319,831959588,381367930,394740937,57425750,933088020,914107301,121638910,655946316,973742360,512213154,674318831,852373000,772924683,429286987,967117927,346071674,186134981,84416132,688143580,189970982,596437599,43536818,805548092,808951546,779505385,13156662,887729006,509708361,768798010,753374718,23411780,442187546,732220984,916581564,224393775,227927225,874614819,130085616,425485417,488212565,463548889,98154957,952015328,552709567,946993331,8810786,268098874,970300016,245243719,396261864,866643550,434625732,214669220,2683048,431300246,848047785,373305933,341883416,873690075,524877545,493937754,530231784,656394253,423974084,245510871,171320200,286418988,754704028,517837424,781835737,618110951,833290113,947538109,177406684,687210191,74284306,413954292,586817207,969013593,283252524,778172601,313594799,459156532,733868284,187998578,127954615,592008250,494909551,913872438,253213721,16906665,321654599,382283400,452328589,550664898,211334390,84307757,288708247,933157774,33011212,279043745,253983166,451864155,126301821,996176030,197983709,739950911,361037788,920194386,557918562,532936930,392559287,233175803,797894971,899812781,44533338,649057159,175913509,516720232,812765791,6856808,887652764,7694531,354357841,476006741,721852560,671517072,411306964,264747227,58897692,849790569,282957628,364858816,548075176,290841083,874989856,275645275,577729543,351545809,428330335,477774371,98635695,339113287,300343895,6531710,690941095,380433062,191720790,920849470,239973405,189492655,351706772,933034459,751383833,463644241,728595170,815892176,616763385,260865932,872310847,82843940,851778823,687367255,348756379,715279420,534175928,554151678,102205168,112922987,989412694,829759045,441505233,442320927,608235597,703515848,907017765,491630579,293856161,912329432,140253064,803118169,324429320,226782581,284531732,314125261,782406953,347844297,857749780,266404677,929662063,614773822,779161171,687664323,890324592,776465004,481700253,918040296,361059041,175162769,186274280,309882727,265018537,79481770,319003879,859919219,369607292,940832540,220265575,461847133,611165620,718442764,326474475,991139336,786241789,791073679,109344287,670757871,581247430,79253816,858548231,414137447,401936725,961508394,108759874,161754872,463369871,527321152,786486489,240363874,246296475,560450474,39807568,597066382,172543926,546215058,452734071,493971348,513923876,690741502,594666089,437643563,414570693,984679604,345529588,176498991,88846605,303141923,227285927,6609476,282945594,654263157,584887262,7692079,209569693,880715339,359688576,250575551,235607427,382859539,472760162,14610526,736943740,790598655,59652307,409051389,75299983,388665045,282081555,633624603,898920649,365031241,729598931,86975045,789396260,59430449,308558438,67077922,884188458,443890972,317822151,80063030,641825381,146657376,971334811,348853247,435237910,363167690,688776702,575191701,494514601,592470049,763678513,452198479,867799564,696095942,768991437,175045557,265022941,339533566,117398391,257541635,575898666,240090592,109267769,152446517,814319326,741544386,454142405,654685133,502147911,331789082,813365881,441570973,324202159,813152790,858760605,954609689,747131185,349034246,123047784,848546561,825529754,706102724,659457618,312612702,467311185,257969907,864931819,358622620,306940148,508672384,595392564,335265537,94555734,421497885,28437142,184786205,440542668,603820641,4780824,302874402,430438510,963399078,751758613,594028307,777254511,101298767,590850716,143684861,447297801,487666365,210985313,471660131,58880462,832376306,988148944,206585813,685586451,194061718,150305969,417101356,417798041,556350319,929756674,201458719,935814966,937540528,830250352,452692073,14031460,543675744,508782735,111508714,478006898,829122427,849849217,746063359,294977213,109328511,739200854,70922303,891040538,52360057,808984156,705093261,51677344,495464499,682996659,269434981,866081706,258299607,333386979,167585169,736575016,17815326,977177617,360702326,111498881,897378088,278347389,134858009,230517700,839572023,888039102,820566939,656841840,853538665,604276785,939627698,75550814,199984659,894046635,559380571,863105769,532196926,696063399,847359844,751078111,411065989,35414550,193748313,644054257,759555383,985496817,601139689,697247289,754879964,906682218,677915916,256643674,552199948,854501210,441596091,807394934,863124041,611140247,220192494,146487192,922139865,436507228,315125747,860104354,301643830,766392993,739526879,322372395,767419110,330709185,46528369,453641852,97531239,122091398,374910039,62737945,612888377,445520143,518739858,69660625,390216834,913669579,274592714,425055488,101335219,743304850,407780413,25438684,128841002,932273849,838124258,398964212,437589482,221141745,198809099,478404678,317633479,939170186,59924915,506281069,390634116,553754222,632825992,741740039,7256318,478318586,233987006,698620582,846457754,483566072,92785650,899808504,791980772,672278473,371274298,375869141,696751551,482047005,393398997,817211250,506763465,875635324,389884941,315719955,947492301,472490113,68487237,102829305,967588448,129866007,457793667,258053459,798593832,166855676,660743160,222581728,228364671,705363491,8488502,237551091,154274270,741305467,346214472,618214027,919824795,733939757,408407727,67702811,783258760,646195490,197221911,756541124,996518372,412936327,477002342,511095596,683636951,78037023,8138871,592190319,245901855,258534255,189116633,147983848,298179386,194440665,526747218,896257961,135968628,811458576,817118819,48805381,908922502,964444908,506973849,298600049,34169977,702957754,952125390,51760556,409049852,984541677,201078221,467788718,455815828,468639167,673978479,754927892,736782669,279517239,213330176,933474452,732530308,181854307,314898877,463657815,530126289,427020040,106165455,963908419,827835112,835186314,916310174,199085777,815963788,845380345,863642479,224385492,738824365,839623503,927881601,480273919,694444518,254056340,772715653,86274601,428878791,863552491,910684122,986343560,600466746,960636362,616142670,608266156,507994225,550782053,129219936,307947454,989083965,418640457,300172353,877148229,725411663,832988649,146390492,212101600,387290732,130273785,536676621,217571599,385259422,183450435,564660491,637099665,97855245,254321559,433632272,551850093,195913455,493523319,58259637,173281133,77550893,302648704,103197399,703170900,538183453,194493744,661009068,924183115,88375631,492598393,442304648,646976933,340649296,138699,190037195,506249008,497464141,759856291,753813183,914331390,353870180,680112555,965979082,98413738,232774485,100468550,567367426,478903360,764306694,545658089,564271821,686524996,614205038,193034986,522808528,320553775,379727479,527750517,140060192,414219518,248147169,842079717,964861072,81041710,431900295,280340934,851695895,790551818,293974315,889204929,661484979,26251551,127824149,888121472,684433034,85941761,775009771,551647438,229338444,205684962,491236123,1623978,894276257,118329951,265227690,429757183,731721335,412807966,897413709,381731804,881136616,235673974,312393314,512669264,607158032,74380604,100254852,948714315,631194295,391664558,400323453,699410731,503965726,671946268,754901393,172043225,980321919,28589822,200387462,679160814,766625165,449051209,24654629,831177636,207884604,377895671,361320681,624743024,450565946,468359119,137424239,763831913,510315016,591168853,929356448,568513813,171908847,45435446,917632080,256312625,4087680,373414633,760509674,335425677,550662531,71565407,865688368,32084206,540266836,216175650,955867502,19730497,66109198,682005381,735460772,222821832,406265669,581320858,415103760,461752663,32806625,198386066,498729236,462450421,234718480,891428507,961541384,56786370,178338659,719401581,943659116,126750630,497898482,407257818,166726746,47555639,112907655,84073426,451697126,263406470,888538159,289383522,807470969,352914721,261214456,452304376,120911468,701223959,573265149,733546351,178176994,173245059,947417288,43047504,912045909,398503556,236313527,77358145,921072136,388177948,519491005,424139520,14341165,831446163,64135315,126188926,329839217,675788301,623106421,810796078,697274690,372881599,285385225,712033068,840338024,119631829,139821173,300386685,533238406,194415485,39893405,665655360,283077498,443062397,391297319,715227896,491735273,475932125,315852404,768473246,576385415,982132097,917789802,569638940,609532608,290717848,598086390,402995898,504614430,977268498,727134460,562427988,810030942,516759341,122113111,657040969,611906902,490403274,822723727,13015556,555560868,313464897,788573390,469780162,48591758,294698059,625564084,933337550,648604166,427130041,601614462,732117970,833707920,618623477,97437670,596935559,447576655,953716099,981535646,697954948,541435961,251837292,740151218,188965747,238316497,350732849,423855631,250979723,101559687,997915691,923225384,535318211,4820069,620252393,283297882,456517122,879348286,636576546,208201631,98022861,151878673,283699201,154002585,698578014,332859936,46223279,438382568,52076630,72903345,869588777,347333637,703787650,956653951,458757176,152296001,926500105,904317189,25319468,89255467,446033993,861068298,221572687,645503082,311222206,359913455,529455531,819431178,591291020,143195575,555448990,707180924,326088970,227454745,975143495,247833188,301815774,919514179,392375699,392488068,27765100,501378427,894528688,24127965,732195317,400970888,929799780,746824899,263152358,883478776,537878848,207873225,705977107,241899434,919578285,177770865,191733906,695336147,903856797,839632456,456547291,660797553,434433964,890960672,336352658,287963215,939763514,95349742,306875948,717726612,38415321,386273853,84586134,726591608,507560464,937628946,51244792,953701633,127332812,875163162,509191199,230899282,371607380,44028019,810475738,781518163,865683958,771678123,821166065,34632762,29949023,459846751,490609728,13625882,594700590,474893098,962347515,658015460,154625555,484333285,395945772,201727168,787459855,716652409,607802822,148585048,798437941,961648087,357491775,531674212,830324630,838733667,383956001,217744345,585737906,237369285,418811853,420934687,772158678,197458057,700726180,179913181,693350508,653860305,796879682,948013040,221607107,677969648,429464521,450323016,123585647,608818624,130676926,341749362,957935485,132057810,881568111,715022054,336971099,806285572,356407758,521554827,290763944,320009073,215619305,104251821,965735144,694118881,25517260,768675198,501448979,60553701,635465324,591654215,589496983,207105504,372820093,653517459,552166368,871635804,222230113,465850683,16787911,309349702,790425536,837148553,784560073,487426288,34678638,738880933,179907307,346496682,282432198,338742963,433082173,69054466,597134295,182738635,533582585,517841116,999844645,826029332,205683836,424746949,882415941,778535374,734977529,687806128,263767974,234987701,788659224,538191993,698772204,799585169,704313783,24281244,783166925,223430610,353997539,200534090,337397523,986196173,897411846,271723517,1843018,828369126,368178776,588391844,949753155,973657028,473443921,389895437,935498259,236309011,810692868,602827442,357373486,546827100,593201877,977389784,888951425,692327388,239647845,965500355,830063318,408521484,784939862,913586795,386280333,467223654,89351923,141664295,134896900,526992345,370762079,129849620,490157711,322474238,781146375,911974500,181873543,450765434,247925947,779141930,551502521,672134574,874182310,590861857,801549770,712037420,97319265,605238763,743466221,936576529,907073800,800441273,256398522,76219598,691010802,496561677,470259926,378175998,914349592,428680071,129335288,119367653,540492661,550915984,37711499,826288869,531084044,981494643,276768815,921642541,70022555,761821257,783089705,663666865,864437069,144130073,736621007,733537871,677441481,241731555,6491277,303412892,227734296,482350375,307094001,593538118,832084453,754521266,725924163,95600932,139394153,85282880,868745875,574813789,179189067,935143223,271788394,832764970,938369319,769529768,962952559,385258364,120976593,546790056,405790735,536943288,963991177,714612219,136624352,531304779,15675560,626135965,702338481,384674265,630514987,279206746,879029152,792033113,762962161,152329525,906058767,863758076,50272696,552405328,981984746,216860659,404963656,698755760,828583420,22025091,559589359,191828290,268616921,560457102,431184340,3914433,143352600,827618152,23915358,177964658,635016686,100029135,620351273,122062960,695674591,888636413,91183926,319608686,573167510,968061082,38430877,304840090,502348410,171054449,594088301,319840189,243188059,11595371,695057391,443593865,773951034,34286759,598818023,605192614,18413934,324381157,382805615,288601907,653887156,382404367,595308923,396348163,962513166,439541289,473392483,352532996,720735092,686149602,447564886,258768418,16207522,37959879,492879384,34542088,675740039,773283604,623212969,102348881,599031868,232525928,423426362,903074724,659004201,538792458,155629737,780275790,504801192,5377752,550875629,654789125,642771477,12679688,722891476,18467522,488698948,183978453,743595156,550059288,450669752,597999571,276420802,371823044,778771471,676269184,18766485,142165009,701557683,279333485,362840307,357138068,645629716,788833223,812658874,693514924,362460619,936941517,459250058,256485016,183603769,618879794,232700098,707990622,137945836,563612949,780792541,18430774,318766310,831707436,492044587,740614385,538513741,697669723,699185055,178023693,120974373,415701276,744474702,486370678,701964189,283106111,132631420,752664763,101279279,440103811,689753830,273622567,138845684,698737130,728500557,229089174,486540837,749682910,25842714,986408311,423948517,735805102,555163862,870657771,470359902,281658780,669183803,634106749,369159600,505067814,749140125,974931480,728559544,712212516,436562899,602442605,633133634,907692371,326439993,955011732,487368124,600152630,412400804,854904939,281389644,776972251,434128146,832713716,911871894,123091891,453020783,424028117,436105467,591540626,882180171,856552742,582508312,533074516,516874945,948413665,878112571,668842022,452280620,718143438,651573627,770831405,823315233,940853112,435021596,590042395,413138468,413226167,591764383,94807166,268305948,197812551,633242239,320708967,543659824,568722662,504233364,475702418,751883859,989679312,573285215,918423578,993477705,864591904,286981925,995570710,454443281,421111931,238239557,807502824,233920602,777530814,416714502,574456356,73127997,135064627,431103898,253894810,234530746,805923618,983386166,969309665,766007933,2119093,130321682,364946553,728857254,291690180,13318252,429456846,997121948,53495299,843888545,774344895,291384787,980167128,888336133,359950332,707005490,966886781,697131618,924623134,71057380,867202255,425597046,79793337,716723536,807781017,660938947,783608214,281104589,944759675,113658566,424616757,194708582,346978039,706081495,405906404,367082020,826047255,264019056,61128614,583502823,257954142,934024341,202925638,555914388,188467230,801386374,63667079,477321558,360481047,45195301,737310073,422195818,240682572,65094544,767701755,20613671,216650360,987018096,431142730,546885564,45442585,339182884,409977120,738789424,776392408,194979077,319437182,446027884,500337957,455816085,483814760,777563264,332854538,727476784,776317724,784963596,315055747,726674382,395282355,27617008,756693982,22630344,299173504,896114041,637636611,803979382,178195400,260100946,700652848,849731948,821446227,577918588,514463937,580803267,851873018,249487768,3109508,613336611,913289427,826997427,370725092,945804278,796420686,844758425,139888651,284895079,769402117,425288709,872801957,82398127,526967168,884085420,359600152,29226810,813891615,485637722,421645646,753576375,931055896,919218065,907140239,723597756,723594955,558198706,75159867,114955417,2370917,276953,353797585,393450428,854160348,314035993,511220856,80114635,689049005,654411436,340613870,908268846,366712030,978507899,912523598,605561121,778383630,774646136,79364470,392556228,52544912,724486974,231028266,987983547,440058430,10051175,511828424,956397222,299166560,486077785,406925551,546692803,663098380,295966535,527802883,232220105,364884161,44672067,840865824,285693812,933786705,170757572,63798447,234470534,250465251,722502776,66121383,401517439,203089548,234635908,15634507,201997382,743326229,670188977,988625862,368116599,916902199};
string a;

long long potega(int n)
{
    long long odp=pot3[n/10];
    for(int i = (n/10)*10+1;i<=n;i++)
    {
        odp=(odp*3)%mod;
    }
    return odp;
}

int main()
{
    cin>>a;
    if(a.size()==1)
    {
        if(a[0]=='0')
        {
            cout<<1;
        }else{
            cout<<3;
        }
    }else{
        long long odp = 0;
        int ost=0;
        int akt=1;
        odp=potega(a.size());
        long long od=2;
        for(int i = 0;i<a.size();i++)
        {
            if(a[i]=='0')odp=(2*mod+odp-(od*potega(a.size()-i-1))%mod)%mod;
            else od=(od*2)%mod;
        }
        //long long odp=potega(a.size()-1);
        //long long dodaj=potega(a.size()-1);
        //dodaj=(2*dodaj)%mod;
        //odp=(odp+dodaj)%mod;
        cout<<odp;
    }
}


Measured memory_bytes: 512