# found using https://github.com/kwantam/addchain
t10 = input        #    0 : 1
t0 = sqr(t10)      #    1 : 2
t1 = t0 * t10      #    2 : 3
t16 = sqr(t0)      #    3 : 4
t6 = sqr(t16)      #    4 : 8
t5 = t6 * t0       #    5 : 10
t0 = t6 * t16      #    6 : 12
t12 = t5 * t16     #    7 : 14
t2 = sqr(t6)       #    8 : 16
t7 = t5 * t6       #    9 : 18
t15 = t0 * t5      #   10 : 22
t17 = sqr(t12)     #   11 : 28
t1 = t17 * t1      #   12 : 31
t3 = t7 * t2       #   13 : 34
t8 = t1 * t17      #   14 : 59
t4 = t8 * t2       #   15 : 75
t9 = t8 * t7       #   16 : 77
t7 = t4 * t5       #   17 : 85
t11 = t4 * t17     #   18 : 103
t5 = t9 * t17      #   19 : 105
t14 = t7 * t15     #   20 : 107
t13 = t11 * t12    #   21 : 117
t12 = t11 * t17    #   22 : 131
t15 = t12 * t15    #   23 : 153
t16 = t15 * t16    #   24 : 157
t3 = t16 * t3      #   25 : 191
t17 = t3 * t17     #   26 : 219
t0 = t17 * t0      #   27 : 231
t6 = t0 * t6       #   28 : 239
t2 = t6 * t2       #   29 : 255
t0 = sqr(t0)       #   30 : 462
t0 = sqr(t0)       #   31 : 924
t0 = sqr(t0)       #   32 : 1848
t0 = sqr(t0)       #   33 : 3696
t0 = sqr(t0)       #   34 : 7392
t0 = sqr(t0)       #   35 : 14784
t0 = sqr(t0)       #   36 : 29568
t0 = sqr(t0)       #   37 : 59136
t0 = t0 * t17      #   38 : 59355
t0 = sqr(t0)       #   39 : 118710
t0 = sqr(t0)       #   40 : 237420
t0 = sqr(t0)       #   41 : 474840
t0 = sqr(t0)       #   42 : 949680
t0 = sqr(t0)       #   43 : 1899360
t0 = sqr(t0)       #   44 : 3798720
t0 = sqr(t0)       #   45 : 7597440
t0 = sqr(t0)       #   46 : 15194880
t0 = sqr(t0)       #   47 : 30389760
t0 = t0 * t16      #   48 : 30389917
t0 = sqr(t0)       #   49 : 60779834
t0 = sqr(t0)       #   50 : 121559668
t0 = sqr(t0)       #   51 : 243119336
t0 = sqr(t0)       #   52 : 486238672
t0 = sqr(t0)       #   53 : 972477344
t0 = sqr(t0)       #   54 : 1944954688
t0 = sqr(t0)       #   55 : 3889909376
t0 = sqr(t0)       #   56 : 7779818752
t0 = sqr(t0)       #   57 : 15559637504
t0 = t0 * t15      #   58 : 15559637657
t0 = sqr(t0)       #   59 : 31119275314
t0 = sqr(t0)       #   60 : 62238550628
t0 = sqr(t0)       #   61 : 124477101256
t0 = sqr(t0)       #   62 : 248954202512
t0 = sqr(t0)       #   63 : 497908405024
t0 = sqr(t0)       #   64 : 995816810048
t0 = sqr(t0)       #   65 : 1991633620096
t0 = sqr(t0)       #   66 : 3983267240192
t0 = sqr(t0)       #   67 : 7966534480384
t0 = t0 * t15      #   68 : 7966534480537
t0 = sqr(t0)       #   69 : 15933068961074
t0 = sqr(t0)       #   70 : 31866137922148
t0 = sqr(t0)       #   71 : 63732275844296
t0 = sqr(t0)       #   72 : 127464551688592
t0 = sqr(t0)       #   73 : 254929103377184
t0 = sqr(t0)       #   74 : 509858206754368
t0 = sqr(t0)       #   75 : 1019716413508736
t0 = t0 * t14      #   76 : 1019716413508843
t0 = sqr(t0)       #   77 : 2039432827017686
t0 = sqr(t0)       #   78 : 4078865654035372
t0 = sqr(t0)       #   79 : 8157731308070744
t0 = sqr(t0)       #   80 : 16315462616141488
t0 = sqr(t0)       #   81 : 32630925232282976
t0 = sqr(t0)       #   82 : 65261850464565952
t0 = sqr(t0)       #   83 : 130523700929131904
t0 = t0 * t13      #   84 : 130523700929132021
t0 = sqr(t0)       #   85 : 261047401858264042
t0 = sqr(t0)       #   86 : 522094803716528084
t0 = sqr(t0)       #   87 : 1044189607433056168
t0 = sqr(t0)       #   88 : 2088379214866112336
t0 = sqr(t0)       #   89 : 4176758429732224672
t0 = sqr(t0)       #   90 : 8353516859464449344
t0 = sqr(t0)       #   91 : 16707033718928898688
t0 = sqr(t0)       #   92 : 33414067437857797376
t0 = sqr(t0)       #   93 : 66828134875715594752
t0 = sqr(t0)       #   94 : 133656269751431189504
t0 = t0 * t12      #   95 : 133656269751431189635
t0 = sqr(t0)       #   96 : 267312539502862379270
t0 = sqr(t0)       #   97 : 534625079005724758540
t0 = sqr(t0)       #   98 : 1069250158011449517080
t0 = sqr(t0)       #   99 : 2138500316022899034160
t0 = sqr(t0)       #  100 : 4277000632045798068320
t0 = sqr(t0)       #  101 : 8554001264091596136640
t0 = sqr(t0)       #  102 : 17108002528183192273280
t0 = sqr(t0)       #  103 : 34216005056366384546560
t0 = sqr(t0)       #  104 : 68432010112732769093120
t0 = t0 * t11      #  105 : 68432010112732769093223
t0 = sqr(t0)       #  106 : 136864020225465538186446
t0 = sqr(t0)       #  107 : 273728040450931076372892
t0 = sqr(t0)       #  108 : 547456080901862152745784
t0 = sqr(t0)       #  109 : 1094912161803724305491568
t0 = sqr(t0)       #  110 : 2189824323607448610983136
t0 = sqr(t0)       #  111 : 4379648647214897221966272
t0 = sqr(t0)       #  112 : 8759297294429794443932544
t0 = sqr(t0)       #  113 : 17518594588859588887865088
t0 = t0 * t8       #  114 : 17518594588859588887865147
t0 = sqr(t0)       #  115 : 35037189177719177775730294
t0 = sqr(t0)       #  116 : 70074378355438355551460588
t0 = sqr(t0)       #  117 : 140148756710876711102921176
t0 = sqr(t0)       #  118 : 280297513421753422205842352
t0 = sqr(t0)       #  119 : 560595026843506844411684704
t0 = sqr(t0)       #  120 : 1121190053687013688823369408
t0 = sqr(t0)       #  121 : 2242380107374027377646738816
t0 = sqr(t0)       #  122 : 4484760214748054755293477632
t0 = t0 * t10      #  123 : 4484760214748054755293477633
t0 = sqr(t0)       #  124 : 8969520429496109510586955266
t0 = sqr(t0)       #  125 : 17939040858992219021173910532
t0 = sqr(t0)       #  126 : 35878081717984438042347821064
t0 = sqr(t0)       #  127 : 71756163435968876084695642128
t0 = sqr(t0)       #  128 : 143512326871937752169391284256
t0 = sqr(t0)       #  129 : 287024653743875504338782568512
t0 = sqr(t0)       #  130 : 574049307487751008677565137024
t0 = sqr(t0)       #  131 : 1148098614975502017355130274048
t0 = sqr(t0)       #  132 : 2296197229951004034710260548096
t0 = sqr(t0)       #  133 : 4592394459902008069420521096192
t0 = sqr(t0)       #  134 : 9184788919804016138841042192384
t0 = sqr(t0)       #  135 : 18369577839608032277682084384768
t0 = sqr(t0)       #  136 : 36739155679216064555364168769536
t0 = sqr(t0)       #  137 : 73478311358432129110728337539072
t0 = t0 * t9       #  138 : 73478311358432129110728337539149
t0 = sqr(t0)       #  139 : 146956622716864258221456675078298
t0 = sqr(t0)       #  140 : 293913245433728516442913350156596
t0 = sqr(t0)       #  141 : 587826490867457032885826700313192
t0 = sqr(t0)       #  142 : 1175652981734914065771653400626384
t0 = sqr(t0)       #  143 : 2351305963469828131543306801252768
t0 = sqr(t0)       #  144 : 4702611926939656263086613602505536
t0 = sqr(t0)       #  145 : 9405223853879312526173227205011072
t0 = sqr(t0)       #  146 : 18810447707758625052346454410022144
t0 = sqr(t0)       #  147 : 37620895415517250104692908820044288
t0 = sqr(t0)       #  148 : 75241790831034500209385817640088576
t0 = t0 * t8       #  149 : 75241790831034500209385817640088635
t0 = sqr(t0)       #  150 : 150483581662069000418771635280177270
t0 = sqr(t0)       #  151 : 300967163324138000837543270560354540
t0 = sqr(t0)       #  152 : 601934326648276001675086541120709080
t0 = sqr(t0)       #  153 : 1203868653296552003350173082241418160
t0 = sqr(t0)       #  154 : 2407737306593104006700346164482836320
t0 = sqr(t0)       #  155 : 4815474613186208013400692328965672640
t0 = sqr(t0)       #  156 : 9630949226372416026801384657931345280
t0 = sqr(t0)       #  157 : 19261898452744832053602769315862690560
t0 = sqr(t0)       #  158 : 38523796905489664107205538631725381120
t0 = sqr(t0)       #  159 : 77047593810979328214411077263450762240
t0 = sqr(t0)       #  160 : 154095187621958656428822154526901524480
t0 = sqr(t0)       #  161 : 308190375243917312857644309053803048960
t0 = sqr(t0)       #  162 : 616380750487834625715288618107606097920
t0 = sqr(t0)       #  163 : 1232761500975669251430577236215212195840
t0 = sqr(t0)       #  164 : 2465523001951338502861154472430424391680
t0 = t0 * t7       #  165 : 2465523001951338502861154472430424391765
t0 = sqr(t0)       #  166 : 4931046003902677005722308944860848783530
t0 = sqr(t0)       #  167 : 9862092007805354011444617889721697567060
t0 = sqr(t0)       #  168 : 19724184015610708022889235779443395134120
t0 = sqr(t0)       #  169 : 39448368031221416045778471558886790268240
t0 = sqr(t0)       #  170 : 78896736062442832091556943117773580536480
t0 = sqr(t0)       #  171 : 157793472124885664183113886235547161072960
t0 = sqr(t0)       #  172 : 315586944249771328366227772471094322145920
t0 = sqr(t0)       #  173 : 631173888499542656732455544942188644291840
t0 = sqr(t0)       #  174 : 1262347776999085313464911089884377288583680
t0 = sqr(t0)       #  175 : 2524695553998170626929822179768754577167360
t0 = t0 * t6       #  176 : 2524695553998170626929822179768754577167599
t0 = sqr(t0)       #  177 : 5049391107996341253859644359537509154335198
t0 = sqr(t0)       #  178 : 10098782215992682507719288719075018308670396
t0 = sqr(t0)       #  179 : 20197564431985365015438577438150036617340792
t0 = sqr(t0)       #  180 : 40395128863970730030877154876300073234681584
t0 = sqr(t0)       #  181 : 80790257727941460061754309752600146469363168
t0 = sqr(t0)       #  182 : 161580515455882920123508619505200292938726336
t0 = sqr(t0)       #  183 : 323161030911765840247017239010400585877452672
t0 = sqr(t0)       #  184 : 646322061823531680494034478020801171754905344
t0 = t0 * t5       #  185 : 646322061823531680494034478020801171754905449
t0 = sqr(t0)       #  186 : 1292644123647063360988068956041602343509810898
t0 = sqr(t0)       #  187 : 2585288247294126721976137912083204687019621796
t0 = sqr(t0)       #  188 : 5170576494588253443952275824166409374039243592
t0 = sqr(t0)       #  189 : 10341152989176506887904551648332818748078487184
t0 = sqr(t0)       #  190 : 20682305978353013775809103296665637496156974368
t0 = sqr(t0)       #  191 : 41364611956706027551618206593331274992313948736
t0 = sqr(t0)       #  192 : 82729223913412055103236413186662549984627897472
t0 = sqr(t0)       #  193 : 165458447826824110206472826373325099969255794944
t0 = sqr(t0)       #  194 : 330916895653648220412945652746650199938511589888
t0 = sqr(t0)       #  195 : 661833791307296440825891305493300399877023179776
t0 = sqr(t0)       #  196 : 1323667582614592881651782610986600799754046359552
t0 = sqr(t0)       #  197 : 2647335165229185763303565221973201599508092719104
t0 = sqr(t0)       #  198 : 5294670330458371526607130443946403199016185438208
t0 = sqr(t0)       #  199 : 10589340660916743053214260887892806398032370876416
t0 = sqr(t0)       #  200 : 21178681321833486106428521775785612796064741752832
t0 = sqr(t0)       #  201 : 42357362643666972212857043551571225592129483505664
t0 = t0 * t3       #  202 : 42357362643666972212857043551571225592129483505855
t0 = sqr(t0)       #  203 : 84714725287333944425714087103142451184258967011710
t0 = sqr(t0)       #  204 : 169429450574667888851428174206284902368517934023420
t0 = sqr(t0)       #  205 : 338858901149335777702856348412569804737035868046840
t0 = sqr(t0)       #  206 : 677717802298671555405712696825139609474071736093680
t0 = sqr(t0)       #  207 : 1355435604597343110811425393650279218948143472187360
t0 = sqr(t0)       #  208 : 2710871209194686221622850787300558437896286944374720
t0 = sqr(t0)       #  209 : 5421742418389372443245701574601116875792573888749440
t0 = sqr(t0)       #  210 : 10843484836778744886491403149202233751585147777498880
t0 = t0 * t2       #  211 : 10843484836778744886491403149202233751585147777499135
t0 = sqr(t0)       #  212 : 21686969673557489772982806298404467503170295554998270
t0 = sqr(t0)       #  213 : 43373939347114979545965612596808935006340591109996540
t0 = sqr(t0)       #  214 : 86747878694229959091931225193617870012681182219993080
t0 = sqr(t0)       #  215 : 173495757388459918183862450387235740025362364439986160
t0 = sqr(t0)       #  216 : 346991514776919836367724900774471480050724728879972320
t0 = sqr(t0)       #  217 : 693983029553839672735449801548942960101449457759944640
t0 = sqr(t0)       #  218 : 1387966059107679345470899603097885920202898915519889280
t0 = t0 * t4       #  219 : 1387966059107679345470899603097885920202898915519889355
t0 = sqr(t0)       #  220 : 2775932118215358690941799206195771840405797831039778710
t0 = sqr(t0)       #  221 : 5551864236430717381883598412391543680811595662079557420
t0 = sqr(t0)       #  222 : 11103728472861434763767196824783087361623191324159114840
t0 = sqr(t0)       #  223 : 22207456945722869527534393649566174723246382648318229680
t0 = sqr(t0)       #  224 : 44414913891445739055068787299132349446492765296636459360
t0 = sqr(t0)       #  225 : 88829827782891478110137574598264698892985530593272918720
t0 = sqr(t0)       #  226 : 177659655565782956220275149196529397785971061186545837440
t0 = sqr(t0)       #  227 : 355319311131565912440550298393058795571942122373091674880
t0 = sqr(t0)       #  228 : 710638622263131824881100596786117591143884244746183349760
t0 = t0 * t2       #  229 : 710638622263131824881100596786117591143884244746183350015
t0 = sqr(t0)       #  230 : 1421277244526263649762201193572235182287768489492366700030
t0 = sqr(t0)       #  231 : 2842554489052527299524402387144470364575536978984733400060
t0 = sqr(t0)       #  232 : 5685108978105054599048804774288940729151073957969466800120
t0 = sqr(t0)       #  233 : 11370217956210109198097609548577881458302147915938933600240
t0 = sqr(t0)       #  234 : 22740435912420218396195219097155762916604295831877867200480
t0 = sqr(t0)       #  235 : 45480871824840436792390438194311525833208591663755734400960
t0 = sqr(t0)       #  236 : 90961743649680873584780876388623051666417183327511468801920
t0 = sqr(t0)       #  237 : 181923487299361747169561752777246103332834366655022937603840
t0 = t0 * t3       #  238 : 181923487299361747169561752777246103332834366655022937604031
t0 = sqr(t0)       #  239 : 363846974598723494339123505554492206665668733310045875208062
t0 = sqr(t0)       #  240 : 727693949197446988678247011108984413331337466620091750416124
t0 = sqr(t0)       #  241 : 1455387898394893977356494022217968826662674933240183500832248
t0 = sqr(t0)       #  242 : 2910775796789787954712988044435937653325349866480367001664496
t0 = sqr(t0)       #  243 : 5821551593579575909425976088871875306650699732960734003328992
t0 = sqr(t0)       #  244 : 11643103187159151818851952177743750613301399465921468006657984
t0 = sqr(t0)       #  245 : 23286206374318303637703904355487501226602798931842936013315968
t0 = sqr(t0)       #  246 : 46572412748636607275407808710975002453205597863685872026631936
t0 = t0 * t2       #  247 : 46572412748636607275407808710975002453205597863685872026632191
t0 = sqr(t0)       #  248 : 93144825497273214550815617421950004906411195727371744053264382
t0 = sqr(t0)       #  249 : 186289650994546429101631234843900009812822391454743488106528764
t0 = sqr(t0)       #  250 : 372579301989092858203262469687800019625644782909486976213057528
t0 = sqr(t0)       #  251 : 745158603978185716406524939375600039251289565818973952426115056
t0 = sqr(t0)       #  252 : 1490317207956371432813049878751200078502579131637947904852230112
t0 = sqr(t0)       #  253 : 2980634415912742865626099757502400157005158263275895809704460224
t0 = sqr(t0)       #  254 : 5961268831825485731252199515004800314010316526551791619408920448
t0 = sqr(t0)       #  255 : 11922537663650971462504399030009600628020633053103583238817840896
t0 = t0 * t2       #  256 : 11922537663650971462504399030009600628020633053103583238817841151
t0 = sqr(t0)       #  257 : 23845075327301942925008798060019201256041266106207166477635682302
t0 = sqr(t0)       #  258 : 47690150654603885850017596120038402512082532212414332955271364604
t0 = sqr(t0)       #  259 : 95380301309207771700035192240076805024165064424828665910542729208
t0 = sqr(t0)       #  260 : 190760602618415543400070384480153610048330128849657331821085458416
t0 = sqr(t0)       #  261 : 381521205236831086800140768960307220096660257699314663642170916832
t0 = sqr(t0)       #  262 : 763042410473662173600281537920614440193320515398629327284341833664
t0 = sqr(t0)       #  263 : 1526084820947324347200563075841228880386641030797258654568683667328
t0 = sqr(t0)       #  264 : 3052169641894648694401126151682457760773282061594517309137367334656
t0 = t0 * t2       #  265 : 3052169641894648694401126151682457760773282061594517309137367334911
t0 = sqr(t0)       #  266 : 6104339283789297388802252303364915521546564123189034618274734669822
t0 = sqr(t0)       #  267 : 12208678567578594777604504606729831043093128246378069236549469339644
t0 = sqr(t0)       #  268 : 24417357135157189555209009213459662086186256492756138473098938679288
t0 = sqr(t0)       #  269 : 48834714270314379110418018426919324172372512985512276946197877358576
t0 = sqr(t0)       #  270 : 97669428540628758220836036853838648344745025971024553892395754717152
t0 = sqr(t0)       #  271 : 195338857081257516441672073707677296689490051942049107784791509434304
t0 = sqr(t0)       #  272 : 390677714162515032883344147415354593378980103884098215569583018868608
t0 = sqr(t0)       #  273 : 781355428325030065766688294830709186757960207768196431139166037737216
t0 = t0 * t3       #  274 : 781355428325030065766688294830709186757960207768196431139166037737407
t0 = sqr(t0)       #  275 : 1562710856650060131533376589661418373515920415536392862278332075474814
t0 = sqr(t0)       #  276 : 3125421713300120263066753179322836747031840831072785724556664150949628
t0 = sqr(t0)       #  277 : 6250843426600240526133506358645673494063681662145571449113328301899256
t0 = sqr(t0)       #  278 : 12501686853200481052267012717291346988127363324291142898226656603798512
t0 = sqr(t0)       #  279 : 25003373706400962104534025434582693976254726648582285796453313207597024
t0 = sqr(t0)       #  280 : 50006747412801924209068050869165387952509453297164571592906626415194048
t0 = sqr(t0)       #  281 : 100013494825603848418136101738330775905018906594329143185813252830388096
t0 = sqr(t0)       #  282 : 200026989651207696836272203476661551810037813188658286371626505660776192
t0 = t0 * t2       #  283 : 200026989651207696836272203476661551810037813188658286371626505660776447
t0 = sqr(t0)       #  284 : 400053979302415393672544406953323103620075626377316572743253011321552894
t0 = sqr(t0)       #  285 : 800107958604830787345088813906646207240151252754633145486506022643105788
t0 = sqr(t0)       #  286 : 1600215917209661574690177627813292414480302505509266290973012045286211576
t0 = sqr(t0)       #  287 : 3200431834419323149380355255626584828960605011018532581946024090572423152
t0 = sqr(t0)       #  288 : 6400863668838646298760710511253169657921210022037065163892048181144846304
t0 = sqr(t0)       #  289 : 12801727337677292597521421022506339315842420044074130327784096362289692608
t0 = sqr(t0)       #  290 : 25603454675354585195042842045012678631684840088148260655568192724579385216
t0 = sqr(t0)       #  291 : 51206909350709170390085684090025357263369680176296521311136385449158770432
t0 = t0 * t2       #  292 : 51206909350709170390085684090025357263369680176296521311136385449158770687
t0 = sqr(t0)       #  293 : 102413818701418340780171368180050714526739360352593042622272770898317541374
t0 = sqr(t0)       #  294 : 204827637402836681560342736360101429053478720705186085244545541796635082748
t0 = sqr(t0)       #  295 : 409655274805673363120685472720202858106957441410372170489091083593270165496
t0 = sqr(t0)       #  296 : 819310549611346726241370945440405716213914882820744340978182167186540330992
t0 = sqr(t0)       #  297 : 1638621099222693452482741890880811432427829765641488681956364334373080661984
t0 = t0 * t1       #  298 : 1638621099222693452482741890880811432427829765641488681956364334373080662015
t0 = sqr(t0)       #  299 : 3277242198445386904965483781761622864855659531282977363912728668746161324030
t0 = sqr(t0)       #  300 : 6554484396890773809930967563523245729711319062565954727825457337492322648060
t0 = sqr(t0)       #  301 : 13108968793781547619861935127046491459422638125131909455650914674984645296120
t0 = sqr(t0)       #  302 : 26217937587563095239723870254092982918845276250263818911301829349969290592240
t0 = sqr(t0)       #  303 : 52435875175126190479447740508185965837690552500527637822603658699938581184480
t0 = t0 * t1       #  304 : 52435875175126190479447740508185965837690552500527637822603658699938581184511