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