#include <bits/stdc++.h>
const int N = 2e5 + 10, mod = 998244353;
int a[N], b[N], c[N], d[N], f0[N], f1[N], f2[N], G[N], g[5][N], rev[N], n, L,
    ans;
using namespace std;
int power(int a, long long b) {
  int res = 1, c = a;
  while (b) {
    if (b & 1) res = 1ll * res * c % mod;
    b >>= 1, c = 1ll * c * c % mod;
  }
  return res;
}
void Get(int n, int opt = 1) {
  L = opt ? 1 : n;
  while (L < n) L <<= 1;
  for (int i = 0; i < L; i++) rev[i] = rev[i >> 1] >> 1 | (i & 1 ? L >> 1 : 0);
}
void fft(int *a, int opt) {
  for (int i = 0; i < L; i++)
    if (rev[i] > i) swap(a[rev[i]], a[i]);
  for (int l = 2; l <= L; l <<= 1) {
    int W = opt == 1 ? power(3, (mod - 1) / l)
                     : power(power(3, (mod - 1) / l), mod - 2);
    for (int i = 0; i < L; i += l)
      for (int j = 0, w = 1; j < l >> 1; j++, w = 1ll * w * W % mod) {
        int x = a[i + j], y = 1ll * a[i + j + l / 2] * w % mod;
        a[i + j] = (x + y) % mod, a[i + j + l / 2] = (x - y) % mod;
      }
  }
  for (int i = 0, v = power(L, mod - 2); i < L; i++)
    if (opt == -1) a[i] = 1ll * a[i] * v % mod;
}
void Inv(int *f, int *g, int n) {
  int c[N];
  f[0] = power(g[0], mod - 2);
  memset(c, 0, sizeof(c));
  for (int l = 2; l < n << 1; l <<= 1) {
    Get(l << 1, 0);
    for (int i = 0; i < l; i++) c[i] = g[i];
    for (int i = l; i < L; i++) c[i] = 0;
    fft(c, 1), fft(f, 1);
    for (int i = 0; i < L; i++)
      f[i] = (2 - 1ll * c[i] * f[i] % mod) * f[i] % mod;
    fft(f, -1);
    for (int i = l; i < L; i++) f[i] = 0;
  }
}
int main() {
  scanf("%d", &n);
  G[0] = G[2] = 1;
  for (int i = 4; i <= n; i += 2)
    G[i] = (G[i - 2] + G[i - 4]) % mod,
    g[0][i] = 1ll * G[i] * i % mod * i % mod,
    g[1][i] = 1ll * G[i] * (i + 1) % mod * (i + 1) % mod,
    g[2][i] = 1ll * G[i] * (i + 2) % mod * (i + 2) % mod;
  g[1][0] = 1, g[2][0] = 4, g[0][2] = 4, g[1][2] = 9, g[2][2] = 16;
  Get((n + 1) << 1);
  for (int i = 0; i <= n; i++)
    a[i] = i < 1 ? 0 : g[0][i - 1], b[i] = i < 3 ? 0 : g[2][i - 3],
    c[i] = g[0][i], d[i] = g[1][i], f1[i] = g[1][i];
  a[0]--, b[0]--;
  fft(a, 1), fft(b, 1), fft(c, 1), fft(d, 1);
  for (int i = 0; i < L; i++)
    a[i] = 1ll * a[i] * b[i] % mod, b[i] = 1ll * c[i] * b[i] % mod,
    d[i] = 1ll * d[i] * d[i] % mod;
  fft(a, -1), fft(b, -1), fft(d, -1);
  for (int i = n + 1; i < L; i++) a[i] = 0, b[i] = 0, d[i] = 0;
  for (int i = 0; i < L; i++)
    c[i] = (a[i] - (i < 4 ? 0 : d[i - 4])) % mod,
    f0[i] = ((i < 3 ? 0 : d[i - 3]) - b[i]) % mod;
  for (int i = n + 1; i < L; i++) c[i] = 0;
  memset(d, 0, sizeof(d));
  Inv(d, c, n + 1);
  Get((n + 1) << 1);
  fft(d, 1), fft(f0, 1), fft(f1, 1);
  for (int i = 0; i < L; i++)
    f0[i] = 1ll * f0[i] * d[i] % mod, f1[i] = 1ll * f1[i] * d[i] % mod;
  fft(f0, -1), fft(f1, -1);
  for (int i = n + 1; i < L; i++) f0[i] = f1[i] = 0;
  for (int i = 0; i < L; i++)
    b[i] = g[1][i], c[i] = i < 3 ? 0 : -g[2][i - 3], d[i] = f1[i];
  c[0]++;
  fft(b, 1), fft(d, 1);
  for (int i = 0; i < L; i++) a[i] = 1ll * b[i] * d[i] % mod;
  fft(a, -1);
  for (int i = n + 1; i < L; i++) a[i] = 0;
  for (int i = 0; i <= n; i++) f2[i] = (g[2][i] + (i < 1 ? 0 : a[i - 1])) % mod;
  memset(a, 0, sizeof(a));
  memset(a, 0, sizeof(a));
  Inv(a, c, n + 1);
  Get((n + 1) << 1);
  fft(f2, 1), fft(a, 1);
  for (int i = 0; i < L; i++) f2[i] = 1ll * f2[i] * a[i] % mod;
  fft(f2, -1);
  for (int i = n + 1; i < L; i++) f2[i] = 0;
  ans = 1ll * (G[n - 1] + G[n - 3]) * (n - 1) % mod * (n - 1) % mod * n % mod;
  for (int i = 2; i <= n - 2; i++)
    ans = (ans +
           1ll * i * (i - 1) % mod * (i - 1) % mod *
               ((1ll * G[i - 1] * f0[n - i - 1] % mod +
                 (i < 3 || i > n - 3 ? 0
                                     : 1ll * G[i - 3] * f2[n - i - 3] % mod)) %
                    mod +
                2ll * G[i - 2] * f1[n - i - 2] % mod) %
               mod) %
          mod;
  printf("%d\n", (ans + mod) % mod);
  return 0;
}
