Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
n=input()
l=[2,3]
exec't=[x*yexec't=sorted(x*y for i,x in enumerate(l)for y in l[i+1:]];l+=min]);l+=min(v for v in t if ,key=(l+t).count(v)<2),;'*n
print l[n]