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).
n = int(input())

def isprime(z):
	for i in range(2, int(z**0.5)+1):
		if z % i == 0:
			return False
	else:
		return True

if isprime(n) == False:
	l = []
	for i in range(2, n//2+1):
		if isprime(i) == True:
			while n % i == 0:
				n /= i
				l.append(int(n)) if n>1 else True

	l = sorted(l)[::-1]
	#print(l)

	m = []
	k = 2
	while len(m) != len(l):
		if isprime(k) == True:
			m.append(k)
		k += 1
	#print(m)
	s = 1
	for i in range(len(l)):
		s *= m[i]**(l[i]-1)
	print(s)
else:
	print(2**(n-1))