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 10<sup class="upper-index">18</sup>.
The first line of the input contains integer *n* (1 ≤ *n* ≤ 1000).
def smallestNumber(N):
    if N == 1:
        return 1
    INF = 1e18
    primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 33, 37, 41, 43]
    powers = [0 for i in primes]
    inx = 0
    possible_solutions = []

    def call_numberOfDivisors(vals):
        p = 1
        for i in vals:
            p *= (i+1)
        return p
    
    def call_smallestPossibleNumber(vals):
        p = 1 
        for i, j in zip(primes, vals):
            p *= i**j
        return p
        
    def recursive_call(values, p_inx):
        current_values = values.copy()
        while True:
            current_values[p_inx] += 1
            divisor = call_numberOfDivisors(current_values)
            number = call_smallestPossibleNumber(current_values)
            if divisor == N:
                possible_solutions.append(number)
            elif divisor < N and number <= INF and (possible_solutions==[] or number < min(possible_solutions)):
                recursive_call(current_values, p_inx+1)
            else:
                break
                
    recursive_call(powers, inx)
    
    if possible_solutions == []:
        return -1

    return min(possible_solutions)
    
print(smallestNumber(int(input())))