MOD = 998244353 N = int(input()) print(6**(N//2)%MOD)