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