print([5, 7, 11, 13, 17, 19, 23, 29, 13, 37, 14][int(input())])