Given the number *n*, find the smallest positive integer which has exactly *n* divisors. It is guaranteed that for the given *n* the answer will not exceed 10<sup class="upper-index">18</sup>.
The first line of the input contains integer *n* (1 ≤ *n* ≤ 1000).

import sys


debug=True
lines = sys.stdin.read().split("\n")
lines.pop(-1)
debug=False

n = [10**18,1,2,4,6,16,12,64,24,36,48,1024,60,4096,192,144,120,65536,180,262144,240,576,3072,4194304,360,1296,12288,900,960,268435456,720,1073741824,840,9216,196608,5184,1260,68719476736,786432,36864,1680,1099511627776,2880,4398046511104,15360,3600,12582912,70368744177664,2520,46656,6480,589824,61440,4503599627370496,6300,82944,6720,2359296,805306368,288230376151711744,5040,10**18,3221225472,14400,7560,331776,46080,10**18,983040,37748736,25920,10**18,10080,10**18,206158430208,32400,3932160,746496,184320,10**18,15120,44100,3298534883328,10**18,20160,5308416,13194139533312,2415919104,107520,10**18,25200,2985984,62914560,9663676416,211106232532992,21233664,27720,10**18,233280,230400,45360,10**18,2949120,10**18,430080,129600,13510798882111488,10**18,50400,10**18,414720,618475290624,60480,10**18,11796480,339738624,4026531840,921600,864691128455135232,47775744,55440,60466176,10**18,9895604649984,16106127360,810000,100800,10**18,83160,39582418599936,1658880,10**18,322560,191102976,10**18,176400,6881280,10**18,188743680,10**18,181440,633318697598976,10**18,241864704,110880,21743271936,10**18,1166400,1030792151040,10**18,226800,10**18,27525120,14745600,3732480,86973087744,1290240,10**18,10**18,40532396646334464,166320,3057647616,352800,10**18,16492674416640,2073600,10**18,10**18,221760,2176782336,26542080,58982400,65970697666560,10**18,12079595520,3240000,967680,10**18,10**18,10**18,277200,10**18,14929920,10**18,440401920,5566277615616,48318382080,3869835264,1055531162664960,705600,106168320,10**18,332640,10**18,10**18,8294400,1632960,10**18,1612800,10**18,498960,10**18,10**18,195689447424,20643840,89060441849856,10**18,943718400,3870720,15479341056,907200,10**18,67553994410557440,10**18,10**18,356241767399424,554400,782757789696,10**18,10**18,2903040,34828517376,3092376453120,10**18,665280,1587600,10**18,10**18,82575360,10**18,1698693120,18662400,28185722880,10**18,6451200,5699868278390784,10**18,10**18,238878720,10**18,720720,10**18,302330880,2822400,10**18,29160000,49478023249920,139314069504,112742891520,10**18,5670000,10**18,1108800,247669456896,10**18,132710400,1081080,10**18,197912092999680,50096498540544,11612160,60397977600,10**18,10**18,3548160,364791569817010176,955514880,10**18,10**18,10**18,1940400,10**18,-8797300802359397806,74649600,10**18,51840000,1321205760,10**18,10**18,241591910400,1995840,10**18,3166593487994880,10**18,10**18,530841600,1209323520,801543976648704,1441440,2821109907456,108716359680,10**18,10**18,10**18,8164800,10**18,7215545057280,11289600,10**18,2229025112064,2494800,3206175906594816,10**18,10**18,247726080,10**18,103219200,10**18,26127360,10**18,434865438720,10**18,14192640,10**18,10**18,6350400,10**18,10**18,202661983231672320,15850845241344,2162160,10**18,15288238080,11284439629824,3880800,207360000,10**18,10**18,115448720916480,51298814505517056,14515200,10**18,10**18,15461882265600,10**18,10**18,2882880,10**18,10883911680,10**18,185794560,63403380965376,412876800,729000000,461794883665920,8493465600,10**18,10**18,84557168640,10**18,22680000,45158400,10644480,10**18,10**18,10**18,10**18,1194393600,10**18,10**18,3603600,101559956668416,10**18,1511654400,104509440,10**18,10**18,10**18,3963617280,247390116249600,27831388078080,10**18,338228674560,10**18,19349176320,39690000,7388718138654720,142657607172096,7761600,10**18,743178240,10**18,10**18,10**18,4324320,466560000,10**18,989560464998400,10**18,10**18,58060800,180551034077184,17962560,10**18,10**18,10**18,17740800,10**18,10**18,4777574400,6486480,10**18,10**18,570630428688384,10**18,21344400,978447237120,4057816381784064,227082240,10**18,445302209249280,10**18,10**18,10**18,6606028800,10**18,42577920,10**18,77396705280,10**18,9979200,10**18,10**18,15832967439974400,472877960873902080,3317760000,10**18,10**18,10**18,6046617600,1781208836997120,10**18,7207200,10**18,3913788948480,543581798400,10**18,1624959306694656,10**18,10**18,31933440,57153600,174142586880,10**18,21646635171840,10**18,10**18,10**18,8648640,10**18,17463600,64925062108545024,10**18,10**18,10**18,1866240000,908328960,10**18,10**18,722534400,11890851840,10**18,130636800,10**18,253671505920,2174327193600,10**18,10**18,70963200,10**18,28499341391953920,10**18,10**18,259700248434180096,10**18,13271040000,1672151040,10**18,10**18,10**18,10810800,36520347436056576,10**18,76441190400,2116316160,10**18,31046400,10**18,10**18,10**18,204120000,10**18,346346162749440,11555266180939776,696570347520,101606400,1014686023680,10**18,10**18,10**18,62370000,10**18,10**18,10**18,14414400,10**18,1238347284480,54419558400,10**18,10**18,928972800,10**18,17297280,2890137600,10**18,10**18,1385384650997760,10**18,250482492702720,10**18,127733760,10**18,422785843200,10**18,10**18,158760000,10**18,46221064723759104,46126080,131621703842267136,10**18,10**18,6688604160,584325558976905216,10**18,10**18,10**18,10**18,10**18,11664000000,25225200,10**18,10**18,10**18,-3684445988414861782,10**18,522547200,10**18,10**18,10**18,362880000,103997395628457984,14533263360,10**18,10**18,139156940390400,10**18,10**18,1691143372800,10**18,25945920,96745881600,10**18,10**18,22166154415964160,10**18,10**18,85377600,10**18,10**18,3715891200,10**18,8465264640,10**18,4007719883243520,212336640000,21621600,10**18,14105549537280,10**18,761014517760,10**18,10**18,10**18,10**18,406425600,10**18,10**18,89812800,415989582513831936,10**18,10**18,64939905515520,10**18,124185600,29859840000,10**18,10**18,11145125560320,10**18,32432400,10**18,16030879532974080,10**18,10**18,37791360000,10**18,10**18,2724986880,4892236185600,10**18,10**18,1135411200,10**18,10**18,2226511046246400,287400960,10**18,10**18,10**18,3044058071040,46242201600,10**18,10**18,184504320,1944810000,10**18,386983526400,10**18,10**18,69854400,10**18,10**18,10**18,10**18,10**18,10**18,46656000000,79254226206720,10**18,36756720,10**18,10**18,10**18,107017666560,8906044184985600,56422198149120,10**18,50450400,10**18,1451520000,19568944742400,10**18,10**18,10**18,10**18,1039038488248320,10**18,256494072527585280,10**18,159667200,10**18,10**18,870712934400,10**18,119439360000,108233175859200,10**18,10**18,10**18,10**18,10**18,43243200,10**18,10**18,192099600,76187381760,10**18,10**18,10**18,2043740160,10**18,317016904826880,10**18,4541644800,10**18,5103000000,10**18,4156153952993280,10**18,59454259200,10**18,10**18,914457600,10**18,10**18,930128855040,10**18,10**18,10**18,249480000,10**18,496742400,10**18,138378240,142496706959769600,10**18,10**18,10**18,10**18,10**18,10**18,10**18,10**18,8360755200,151165440000,10**18,10**18,10**18,10**18,61261200,10**18,507799783342080,10**18,10**18,13589544960000,10581580800,10**18,1149603840,341510400,10**18,10**18,10**18,10**18,10**18,1428840000,-8533299554666582866,10**18,1731730813747200,10**18,194819716546560,3482851737600,10**18,10**18,3720515420160,10**18,10**18,10**18,135444234240,10**18,436590000,10**18,66498463247892480,10**18,713288035860480,10**18,100900800,10**18,10**18,6191736422400,8174960640,10**18,10**18,10**18,10**18,6502809600,10**18,10**18,73513440,10**18,3265920000,10**18,10**18,10**18,6926923254988800,54358179840000,10**18,1252412463513600,10**18,10**18,638668800,10**18,902755170385920,2959500902400,233513280,10**18,10**18,10**18,10**18,10**18,10**18,10**18,230630400,10**18,10**18,10**18,10**18,10**18,33443020800,10**18,110270160,10**18,10**18,10**18,10**18,1911029760000,2853152143441920,10**18,10**18,10**18,277477200,10**18,6849130659840,10**18,20289081908920320,10**18,2952069120,10**18,10**18,3657830400,3117115464744960,10**18,10**18,10**18,10**18,2540160000,10**18,10**18,72666316800,10**18,10**18,10**18,553512960,746496000000,10**18,10**18,541776936960,11838003609600,10**18,10**18,129729600,10**18,10**18,10**18,10**18,1360488960000,110830772079820800,944784000000,10**18,10**18,23224320000,10**18,10**18,10**18,10**18,26011238400,10**18,10**18,42326323200,10**18,12468461858979840,20038599416217600,10**18,10**18,122522400,10**18,10**18,70527747686400,27396522639360,10**18,3805072588800,10**18,10**18,10**18,8124796533473280,7779240000,10**18,10**18,10**18,10**18,415134720,10**18,628689600,10**18,1218998108160,10**18,10**18,10**18,238112986890240,10**18,10**18,1366041600,10**18,10**18,10**18,10**18,147026880,55725627801600,10**18,10**18,227026800,10**18,324625310542725120,80154397664870400,10**18,10**18,10**18,10**18,10**18,10**18,13063680000,10**18,11808276480,10**18,10**18,10**18,10**18,10**18,7947878400,10**18,130799370240,10**18,10**18,10**18,1437004800,3478923509760000,10**18,10**18,2790386565120,10**18,15220290355200,2985984000000,10**18,10**18,10**18,2418647040000,922521600,10**18,10**18,10**18,199495389743677440,10**18,10**18,10**18,10**18,768398400,10**18,10**18,10**18,10**18,92897280000,10**18,18393661440,10**18,10**18,10**18,10**18,396271131033600,10**18,10**18,183783600,10**18,182601737180282880,10**18,10**18,10**18,535088332800,10**18,-7808347264705645366,282110990745600,10**18,10**18,403603200,10**18,10**18,10160640000,10**18,10**18,10**18,10**18,2245320000,10**18,10**18,10**18,3809807790243840,10**18,57776330904698880,10**18,4875992432640,10**18,1117670400,10**18,11161546260480,10**18,10**18,10**18,10**18,10**18,10**18,757632231014400,810810000]

print(a[int(lines[0])])


