#include <bits/stdc++.h>
const int N = 562144;
const long long MOD = 998244353LL;
using namespace std;
int n, m;
long long x[N], y[N];
long long wn[25];
long long Mul(long long x, long long y) { return x * y % MOD; }
long long Qpow(long long a, long long b, long long M) {
  long long ans = 1;
  a %= M;
  while (b) {
    if (b & 1) ans = Mul(ans, a);
    a = Mul(a, a);
    b >>= 1;
  }
  return ans;
}
void Getwn() {
  for (int i = 0; i < 25; i++) {
    wn[i] = Qpow(3, (MOD - 1) / (1 << i), MOD);
  }
}
void NTT(long long *x, int n, int rev) {
  int i, j, k, ds;
  long long w, u, v;
  for (i = 1, j = n >> 1, k = n >> 1; i < n - 1; i++, k = n >> 1) {
    if (i < j) swap(x[i], x[j]);
    while (j >= k) j -= k, k >>= 1;
    if (j < k) j += k;
  }
  for (i = 2, ds = 1; i <= n; i <<= 1, ds++) {
    for (j = 0; j < n; j += i) {
      w = 1;
      for (k = j; k < j + i / 2; k++) {
        u = x[k];
        v = Mul(w, x[k + i / 2]);
        x[k] = (u + v) % MOD;
        x[k + i / 2] = (u - v + MOD) % MOD;
        w = Mul(w, wn[ds]);
      }
    }
  }
  if (rev == -1) {
    for (i = 1; i < n / 2; i++) swap(x[i], x[n - i]);
    w = Qpow(n, MOD - 2, MOD);
    for (i = 0; i < n; i++) x[i] = Mul(x[i], w);
  }
}
void mul(long long x[], long long y[], int len1, int len2) {
  int len = 1;
  while (len < len1 * 2 || len < len2 * 2) len <<= 1;
  NTT(x, len, 1);
  NTT(y, len, 1);
  for (int i = 0; i < len; i++) x[i] = x[i] * y[i];
  NTT(x, len, -1);
  NTT(y, len, -1);
}
long long h[N];
void inv(long long a[], long long b[], int n_) {
  int t;
  b[0] = Qpow(a[0], MOD - 2, MOD);
  for (int t = 2; t <= n_ * 2; t <<= 1) {
    for (int i = 0; i < t; i++) h[i] = a[i];
    for (int i = t; i < (t << 2); i++) h[i] = 0;
    for (int i = t; i < (t << 2); i++) b[i] = 0;
    NTT(h, t << 2, 1);
    NTT(b, t << 2, 1);
    for (int i = 0; i < (t << 2); i++) {
      b[i] = 2 * b[i] - h[i] * b[i] % MOD * b[i] % MOD;
      b[i] %= MOD;
      if (b[i] < 0) b[i] += MOD;
    }
    NTT(b, t << 2, -1);
  }
}
long long a[N], b[N], ds[N], ss[N], s[N], is[N], hs[N], o1[N], o2[N];
long long f[N];
int main() {
  Getwn();
  int n;
  scanf("%d", &n);
  f[0] = 1;
  f[1] = 1;
  for (int i = 2; i <= n; i++) f[i] = (f[i - 2] + f[i - 1]) % MOD;
  a[0] = 1;
  for (int i = 2; i < n; i += 2)
    a[i + 1] = (MOD - 1ll * i * i % MOD * f[i / 2] % MOD) % MOD;
  inv(a, b, n + 1);
  for (int i = 0; i <= n; i++) o1[i] = b[i];
  for (int i = n + 1; i < N; i++) b[i] = 0;
  memset(a, 0, sizeof a);
  for (int i = 1; i < n; i += 2)
    ss[i + 1] = (1ll * i * i % MOD * f[i / 2]) % MOD;
  mul(ss, b, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) ss[i] = 0;
  memset(b, 0, sizeof b);
  a[0] = 1;
  for (int i = 2; i < n; i += 2)
    a[i + 1] = (MOD - 1ll * i * i % MOD * f[(i / 2) - 1] % MOD) % MOD;
  inv(a, b, n + 1);
  for (int i = 0; i <= n; i++) o2[i] = b[i];
  for (int i = n + 1; i < N; i++) b[i] = 0;
  memset(a, 0, sizeof a);
  for (int i = 1; i < n; i += 2)
    ds[i + 1] = (1ll * i * i % MOD * f[i / 2]) % MOD;
  mul(ds, b, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) ds[i] = 0;
  memset(b, 0, sizeof b);
  for (int i = 0; i <= n; i++) s[i] = ds[i];
  mul(s, ss, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) s[i] = 0;
  s[0] = (MOD + 1 - s[0]) % MOD;
  for (int i = 1; i <= n; i++) s[i] = (MOD - s[i]) % MOD;
  inv(s, is, n + 1);
  for (int i = n + 1; i < N; i++) is[i] = 0;
  long long ans = 0;
  for (int i = 2; i < n; i += 2)
    a[i + 1] = (1ll * (i + 1) * i * i % MOD * (f[i / 2])) % MOD;
  mul(a, is, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) a[i] = 0;
  mul(a, o1, n + 1, n + 1);
  ans = (ans + a[n]) % MOD;
  memset(a, 0, sizeof a);
  for (int i = 2; i < n; i += 2)
    a[i + 1] = (1ll * (i + 1) * i * i % MOD * (f[(i / 2) - 1])) % MOD;
  mul(a, is, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) a[i] = 0;
  mul(a, o2, n + 1, n + 1);
  ans = (ans + a[n]) % MOD;
  memset(a, 0, sizeof a);
  for (int i = 1; i < n; i += 2)
    a[i + 1] = (1ll * (i + 1) * i * i % MOD * f[i / 2]) % MOD;
  mul(a, ss, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) a[i] = 0;
  mul(a, is, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) a[i] = 0;
  mul(a, o2, n + 1, n + 1);
  ans = (ans + a[n]) % MOD;
  memset(a, 0, sizeof a);
  for (int i = 1; i < n; i += 2)
    a[i + 1] = (1ll * (i + 1) * i * i % MOD * f[i / 2]) % MOD;
  mul(a, ds, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) a[i] = 0;
  mul(a, is, n + 1, n + 1);
  for (int i = n + 1; i < N; i++) a[i] = 0;
  mul(a, o1, n + 1, n + 1);
  ans = (ans + a[n]) % MOD;
  memset(a, 0, sizeof a);
  printf("%lld", ans);
  return 0;
}
