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