LearnPy Hub
← Arena
IntermediateRating 1300

n-th Ugly Number

Ugly numbers have no prime factors other than 2, 3 and 5: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, … Print the n-th.

Input

One integer n (1 ≤ n ≤ 2000).

Output

One integer.

Sample 1

Input
1
Output
1

Sample 2

Input
10
Output
12
solution.py
Output appears here
n-th Ugly Number · Python Arena problem · LearnPy Hub