MOD = 998244353 N = int(input()) ans = pow(6, N//2, MOD) print(ans)