#6^(N//2)のMODを出す. ans=1 MOD=998244353 N=int(input())//2 p=6 while N>0: if N%2==1:ans=(ans*p)%MOD p=(p*p)%MOD N=N//2 print(ans)