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