import sys readline=sys.stdin.readline write=sys.stdout.write N=int(readline()) mod=998244353 ans=pow(6,N//2,mod) print(ans)