N = int(input()) if N%2==0: M = N/2 else: M = (N-1)/2 print((6**M)%998244353)