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