Positive integers that are convenient for forming various measurement systems are called practical. A positive integer $$$x$$$ will be practical if any natural number less than $$$x$$$ can be represented as the sum of any different divisors of $$$x$$$.
For example, the number $$$6$$$ is practical since using the sum of its divisors $$$1, 2, 3, 6$$$, you can represent any number from $$$1$$$ to $$$6$$$: $$$1 = 1$$$, $$$2 = 2$$$, $$$3 = 3$$$, $$$4 = 1 + 3$$$, $$$5 = 2 + 3$$$, and $$$6 = 6$$$.
On the other hand, the number $$$9$$$ is not practical since, using its divisors $$$1, 3, 9$$$, it is impossible to represent the numbers $$$2, 5, 6, 7$$$ and $$$8$$$.
There are infinitely many practical numbers, and they have many useful properties. In particular:
Among the practical numbers, primitive practical numbers stand out - those that cannot be obtained from other practical numbers by multiplying them or multiplying a practical number by any of its divisors.
Write a program that, by the number $$$n$$$, returns the $$$n$$$-th largest primitive practical number.
The single line contains an integer $$$n$$$ ($$$1 \leq n \leq 10\,000$$$) – the number of the desired primitive practical number.
In a single line, print a positive integer – the $$$n$$$-th largest primitive practical number.
5
28
1
1
| Name |
|---|


