N = int(input()) num = 1 M = 10**5 L = [0]*(M+1) for i in range(2, M+1): if L[i] == 0: num *= i j = 1 while i*j <= M: L[i*j] = 1 j += 1 ans = pow(num+1, N-1) print(ans)