N=int(input()) a=[1] for n in range(1,20): for i in range(2,n): if n%i==0 and (n not in a) : a.append(n) print(a[N-1])