import sys input = sys.stdin.readline N=int(input()) mod=998244353 if N%2==1: print(0) exit() x=N//2-1 print((pow(4,x,mod)-pow(3,x,mod))%mod)