#P1748. H 数

H 数

Description

An H number is a number that has no prime factors other than 2,3,5,72, 3, 5, 7. For example, 630630 is an H number, whereas 2222 is not. In particular, 11 is the smallest H number. Now, output the nn-th smallest H number.

Input Format

A positive integer n (1n104)n\ (1 \le n \le 10^4).

Output Format

A single positive integer representing the answer. It can be proven that the answer will not exceed 26312^{63}-1.

30
49
1
1

Hint

Translated by ChatGPT 5