import sequtils,strutils var N = stdin.readline.parseInt P = newSeq[int64](0) ans : int64 if N == 1: echo 1 else: var b = 100000 while P.len < 6: b += 1 var f = false for i in 2..10000: if b mod i == 0: f = true break if not f: P.add(b.int64) var cnt = 1 for i in 0..6: for j in 0..i: cnt += 1 if cnt == N: ans = P[i] * P[j] echo ans