#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 10;
const long long mod = 998244353;
long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 3) + (x << 1) + c - 48;
    c = getchar();
  }
  return x * f;
}
long long fpm(long long x, long long y) {
  long long sum = 1;
  while (y) {
    if (y & 1) sum = sum * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return sum;
}
long long g = 3, invg = fpm(3, mod - 2), len = 1, L = 0, w[maxn];
long long A0[maxn], A1[maxn], A2[maxn], B00[maxn], B01[maxn], B10[maxn],
    B11[maxn], p[maxn];
void init() {
  for (register long long i = 0; i <= len; i++) {
    w[i] = (w[i >> 1] >> 1) | ((i & 1) << (L - 1));
    p[i] = A0[i] = A1[i] = A2[i] = B00[i] = B01[i] = B10[i] = B11[i] = 0;
  }
}
void NTT(long long *f, long long op) {
  for (register long long i = 0; i < len; i++) {
    if (i < w[i]) swap(f[i], f[w[i]]);
  }
  for (register long long j = 1; j < len; j <<= 1) {
    long long tmp = fpm(op ? g : invg, (mod - 1) / (j << 1));
    for (register long long k = 0; k < len; k += (j << 1)) {
      long long t = 1;
      for (register long long l = 0; l < j; l++, t = t * tmp % mod) {
        long long a1 = f[k + l], a2 = f[k + l + j] * t % mod;
        (f[k + l] = a1 + a2) %= mod;
        (f[k + l + j] = a1 - a2 + mod) %= mod;
      }
    }
  }
  if (op <= 0) {
    long long invn = fpm(len, mod - 2);
    for (register long long i = 0; i < len; i++) f[i] = f[i] * invn % mod;
  }
}
long long k, m, n, S[maxn], w0[maxn], w1[maxn], w2[maxn];
long long f00[maxn], f01[maxn], f10[maxn], f11[maxn];
void solve(long long l, long long r) {
  if (l > r) return;
  if (l == r) {
    (f00[l] += w0[l] * l % mod) %= mod;
    (f01[l] += w1[l] * l % mod) %= mod;
    (f10[l] += w1[l] * l % mod) %= mod;
    (f11[l] += w2[l] * l % mod) %= mod;
    return;
  }
  long long mid = (l + r) >> 1;
  solve(l, mid);
  long long n = mid - l, m = r - l;
  len = 1;
  L = 0;
  while (len <= n + m) len <<= 1, L++;
  init();
  for (register long long i = 0; i <= m; i++) {
    A0[i] = w0[i];
    A1[i] = w1[i];
    A2[i] = w2[i];
  }
  for (register long long i = 0; i <= n; i++) {
    B00[i] = f00[l + i];
    B01[i] = f01[l + i];
    B10[i] = f10[l + i];
    B11[i] = f11[l + i];
  }
  NTT(A0, 1);
  NTT(A1, 1);
  NTT(A2, 1);
  NTT(B00, 1);
  NTT(B01, 1);
  NTT(B10, 1);
  NTT(B11, 1);
  for (register long long i = 0; i < len; i++)
    (p[i] = B00[i] * A0[i] % mod + B01[i] * A1[i] % mod) %= mod;
  NTT(p, 0);
  for (register long long i = n + 1; i <= m; i++) (f00[l + i] += p[i]) %= mod;
  for (register long long i = 0; i < len; i++)
    (p[i] = B00[i] * A1[i] % mod + B01[i] * A2[i] % mod) %= mod;
  NTT(p, 0);
  for (register long long i = n + 1; i <= m; i++) (f01[l + i] += p[i]) %= mod;
  for (register long long i = 0; i < len; i++)
    (p[i] = B10[i] * A0[i] % mod + B11[i] * A1[i] % mod) %= mod;
  NTT(p, 0);
  for (register long long i = n + 1; i <= m; i++) (f10[l + i] += p[i]) %= mod;
  for (register long long i = 0; i < len; i++)
    (p[i] = B10[i] * A1[i] % mod + B11[i] * A2[i] % mod) %= mod;
  NTT(p, 0);
  for (register long long i = n + 1; i <= m; i++) (f11[l + i] += p[i]) %= mod;
  solve(mid + 1, r);
  return;
}
signed main() {
  n = read();
  S[0] = 1;
  for (register long long i = 2; i <= n; i++) {
    S[i] += S[i - 2];
    if (i >= 4) (S[i] += S[i - 4]) %= mod;
  }
  for (register long long i = 2; i <= n; i++) {
    w0[i] = S[i - 1] * (i - 1) % mod * (i - 1) % mod;
    w1[i] = S[i - 2] * (i - 1) % mod * (i - 1) % mod;
    if (i >= 3) w2[i] = S[i - 3] * (i - 1) % mod * (i - 1) % mod;
  }
  solve(1, n);
  printf("%lld\n", (f00[n] + f11[n]) % mod);
  return 0;
}
