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 1018.

Input

The first line of the input contains integer n (1 ≤ n ≤ 1000).

Output

Output the smallest positive integer with exactly n divisors.

Examples

Input

4


Output

6


Input

6


Output

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