N = int(input()) if N == 1: ans = 1 else: 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 = (num+1)*pow(M+1, N-1) print(ans)