import sys N = int(input()) def pow_r(x, n): if n == 0: return 1 if n % 2 == 0: return pow_r(x**2, n//2) % 998244353 else: return x * pow_r(x**2, (n-1)//2) % 998244353 print(pow_r(6, N//2))