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