import sys MOD = 998244353 def solve(): n = int(sys.stdin.readline()) return pow(6, n // 2, MOD) print(solve())