n = readline.to_i ans = [7, 9, 11, 13, 14, 18, 19, 21, 22, 23] puts ans[n - 1]