import sequtils,strutils var N = stdin.readline.parseInt if N == 1: echo 1 else: var b = 100000 while N > 1: b += 1 var f = false for i in 2..1000: if b mod i == 0: f = true break if not f: N -= 1 if N == 1: echo b