def yukicoder1476_esreveRdnaesreveR(N): t = N // 2 ans = pow(6,t,998244353) return ans N = int(input()) print(yukicoder1476_esreveRdnaesreveR(N))