L = [5, 7, 11, 13, 17, 19, 23, 29, 37, 47, 59, 67, 47] N = int(input()) print(L[N])