The package for this problem was not updated by the problem writer or Codeforces administration after we've upgraded the judging servers. To adjust the time limit constraint, a solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then the value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

brute force

dp

number theory

*2000

No tag edit access

The problem statement has recently been changed. View the changes.

×
E. Number With The Given Amount Of Divisors

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputGiven 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^{18}.

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

Codeforces (c) Copyright 2010-2024 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Apr/14/2024 23:03:18 (l3).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|