#include <bits/stdc++.h>
template <typename T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool flag = false;
  while (!isdigit(c)) {
    if (c == '-') flag = true;
    c = getchar();
  }
  while (isdigit(c)) x = x * 10 + (c ^ 48), c = getchar();
  if (flag) x = -x;
}
using namespace std;
const int P = 998244353;
const int G = 3;
inline long long quickpow(long long x, int k) {
  long long res = 1;
  while (k) {
    if (k & 1) res = res * x % P;
    x = x * x % P;
    k >>= 1;
  }
  return res;
}
int n;
int r[201000], lst;
inline void ntt(long long *a, int limi, int type) {
  if (limi != lst) {
    lst = limi;
    for (int i = 0; i < limi; ++i)
      r[i] = (r[i >> 1] >> 1) | ((i & 1) ? limi >> 1 : 0);
  }
  for (int i = 0; i < limi; ++i)
    if (i < r[i]) swap(a[i], a[r[i]]);
  for (int i = 1; i < limi; i <<= 1) {
    long long T = quickpow(G, (P - 1) / (i << 1));
    for (int j = 0; j < limi; j += (i << 1)) {
      long long t = 1;
      for (int k = 0; k < i; ++k, t = t * T % P) {
        long long nx = a[j + k], ny = a[i + j + k] * t % P;
        a[j + k] = (nx + ny) % P;
        a[i + j + k] = (nx - ny + P) % P;
      }
    }
  }
  if (type == -1) {
    long long inv = quickpow(limi, P - 2);
    for (int i = 0; i < limi; ++i) a[i] = a[i] * inv % P;
    reverse(a + 1, a + limi);
  }
}
long long Mul_A[201000], Mul_B[201000];
inline void Mul(long long *a, long long *b, long long *c, int d) {
  for (int i = 0; i < d; ++i) Mul_A[i] = a[i], Mul_B[i] = b[i];
  int limi = 1;
  while (limi <= d + d) limi <<= 1;
  ntt(Mul_A, limi, 1), ntt(Mul_B, limi, 1);
  for (int i = 0; i < limi; ++i)
    c[i] = Mul_A[i] * Mul_B[i] % P, Mul_A[i] = Mul_B[i] = 0;
  ntt(c, limi, -1);
  for (int i = d; i < limi; ++i) c[i] = 0;
}
long long Fang_A[201000];
inline void Fang(long long *a, long long *b, int d) {
  for (int i = 0; i < d; ++i) Fang_A[i] = a[i];
  int limi = 1;
  while (limi <= d + d) limi <<= 1;
  ntt(Fang_A, limi, 1);
  for (int i = 0; i < limi; ++i)
    b[i] = Fang_A[i] * Fang_A[i] % P, Fang_A[i] = 0;
  ntt(b, limi, -1);
  for (int i = d; i < limi; ++i) b[i] = 0;
}
long long inv_A[201000], inv_B[201000];
inline void get_inv(long long *a, long long *b, int d) {
  b[0] = quickpow(a[0], P - 2);
  for (int len = 2; (len >> 1) < d; len <<= 1) {
    int limi = len + len;
    for (int i = 0; i < len; ++i) inv_A[i] = a[i], inv_B[i] = b[i];
    ntt(inv_A, limi, 1), ntt(inv_B, limi, 1);
    for (int i = 0; i < limi; ++i)
      inv_B[i] = inv_B[i] * (2ll - inv_A[i] * inv_B[i] % P + P) % P,
      inv_A[i] = 0;
    ntt(inv_B, limi, -1);
    for (int i = 0; i < len; ++i) b[i] = inv_B[i];
    for (int i = 0; i < limi; ++i) inv_B[i] = 0;
  }
  for (int i = d; i < 2 * d; ++i) b[i] = 0;
}
long long G0[201000], G1[201000], G2[201000], K[201000], jzpP[201000],
    Q[201000], F0[201000], F1[201000], F2[201000];
inline void init_G() {
  G0[0] = 1;
  for (int i = 2; i <= n; ++i)
    G0[i] = ((i - 2 >= 0 ? G0[i - 2] : 0) + (i - 4 >= 0 ? G0[i - 4] : 0)) % P;
  for (int i = 1; i <= n; ++i) G1[i] = G0[i - 1];
  for (int i = 2; i <= n; ++i) G2[i] = G0[i - 2];
  for (int i = 0; i <= n; ++i) G0[i] = G0[i] * i % P * i % P;
  for (int i = 0; i <= n; ++i) G1[i] = G1[i] * i % P * i % P;
  for (int i = 0; i <= n; ++i) G2[i] = G2[i] * i % P * i % P;
}
inline void init_K() {
  K[0] = 1;
  for (int i = 1; i <= n; ++i) K[i] = P - G0[i - 1];
}
inline void init_P() {
  jzpP[0] = 1;
  for (int i = 1; i <= n; ++i) jzpP[i] = P - G2[i - 1];
}
long long KP[201000], G1_2[201000];
inline void calc_F1() {
  Mul(K, jzpP, KP, n + 1);
  Fang(G1, G1_2, n + 1);
  for (int i = 2; i <= n; ++i) KP[i] = (KP[i] - G1_2[i - 2] + P) % P;
  memset(G1_2, 0, 8 * (n + 1) + 10);
  get_inv(KP, G1_2, n + 1);
  memset(KP, 0, 8 * (n + 1) + 10);
  Mul(G1_2, G1, F1, n + 1);
}
inline void calc_Q() {
  Mul(G1, F1, Q, n + 1);
  for (int i = n; i; --i) Q[i] = Q[i - 1];
  Q[0] = 0;
}
long long tmpH[201000], tmpG[201000];
inline void calc_F0() {
  for (int i = 0; i <= n; ++i) tmpH[i] = (G0[i] + Q[i]) % P;
  get_inv(K, tmpG, n + 1);
  Mul(tmpH, tmpG, F0, n + 1);
}
inline void calc_F2() {
  memset(tmpH, 0, 8 * (n + 1) + 10);
  memset(tmpG, 0, 8 * (n + 1) + 10);
  for (int i = 0; i <= n; ++i) tmpH[i] = (G2[i] + Q[i]) % P;
  get_inv(jzpP, tmpG, n + 1);
  Mul(tmpH, tmpG, F2, n + 1);
}
long long ansH[201000];
inline void get_ans() {
  memset(tmpH, 0, 8 * n + 20);
  memset(tmpG, 0, 8 * n + 20);
  long long res = n * (G0[n - 1] + G2[n - 1]) % P;
  for (int i = 0, j = 1; i <= n; ++i, ++j)
    G0[i] = G0[i] * j % P, G1[i] = G1[i] * j % P, G2[i] = G2[i] * j % P;
  Mul(F0, G0, tmpH, n + 1);
  for (int i = 0; i <= n; ++i) ansH[i] = (ansH[i] + tmpH[i]) % P, tmpH[i] = 0;
  Mul(F1, G1, tmpH, n + 1);
  for (int i = 0; i <= n; ++i)
    ansH[i] = (ansH[i] + 2ll * tmpH[i]) % P, tmpH[i] = 0;
  Mul(F2, G2, tmpH, n + 1);
  for (int i = 0; i <= n; ++i) ansH[i] = (ansH[i] + tmpH[i]) % P, tmpH[i] = 0;
  printf("%lld\n", (ansH[n - 2] + res) % P);
}
int main() {
  read(n);
  init_G();
  init_K();
  init_P();
  calc_F1();
  calc_Q();
  calc_F0();
  calc_F2();
  get_ans();
  return 0;
}
