N = int(input()) p = 998244353 PN = 2 * 10 ** 5 + 100 fact = [1, 1] factinv = [1, 1] inv = [0, 1] def cmb(n, r, p): if (r < 0) or (n < r): return 0 r = min(r, n - r) return fact[n] * factinv[r] * factinv[n-r] % p for i in range(2, PN + 1): fact.append((fact[-1] * i) % p) inv.append((-inv[p % i] * (p // i)) % p) factinv.append((factinv[-1] * inv[-1]) % p) po = [0]*(PN) po[0] = 1 for i in range(1,N+2): po[i] = po[i-1]*2%p ans = 0 if N%4 == 0: cnt = 0 for i in range(N//4): ans = (ans+(cmb(N,i*2,p)*4*po[N-i]))%p cnt = (cnt + cmb(N,i*2,p)*4)%p ans = (ans+(po[N] - cnt)%p)%p if N % 2 ==0: for a,i in enumerate(range(N,-1,-4)): ans = (ans+(cmb(N,a*2,p)*4*po[i]))%p else: for i in range(N//2+1): ans = (ans+(cmb(N,i,p)*2*po[N-(i*2)]))%p print(ans)