#include <bits/stdc++.h>
template <typename Y>
inline bool updmin(Y &a, Y b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename Y>
inline bool updmax(Y &a, Y b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename Y>
inline Y abs(Y a) {
  if (a < 0) a = -a;
  return a;
}
template <typename Y>
inline Y sqr(Y a) {
  return a * a;
}
int read() {
  int w = 1, q = 0, ch = ' ';
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') w = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) q = q * 10 + ch - 48;
  return q * w;
}
inline void FileIO() {
  freopen(
      "chocodisco"
      ".in",
      "r", stdin);
  freopen(
      "chocodisco"
      ".out",
      "w", stdout);
}
using namespace std;
const long long mod = 998244353;
const long long g0 = 3;
const int N = 262150;
int rnk[N];
inline long long qpow(long long t, long long b) {
  long long r = 1;
  while (b) {
    if (b & 1) r = r * t % mod;
    t = t * t % mod;
    b >>= 1;
  }
  return r;
}
long long w[2][N];
void NTTinit() {
  for (int i = 1; i < (1 << 18); i <<= 1) {
    long long wn = qpow(g0, (mod - 1) / (i << 1));
    for (int j = 0; j < i; j++) {
      w[1][i + j] = (j ? wn * w[1][i + j - 1] % mod : 1);
    }
    wn = qpow(g0, mod - 1 - (mod - 1) / (i << 1));
    for (int j = 0; j < i; j++) {
      w[0][i + j] = (j ? wn * w[0][i + j - 1] % mod : 1);
    }
  }
}
inline void NTT(long long *a, int fl, int n) {
  updmax(fl, 0);
  int L = 0;
  for (int _n = n; _n > 1; _n >>= 1, L++)
    ;
  for (int i = 0; i < n; i++) {
    rnk[i] = (rnk[i >> 1] >> 1) | ((i & 1) << (L - 1));
  }
  for (int i = 0; i < n; ++i) {
    if (i < rnk[i]) {
      swap(a[i], a[rnk[i]]);
    }
  }
  for (int i = 1; i < n; i <<= 1) {
    for (int j = 0; j < n; j += i << 1) {
      for (int k = 0; k < i; k++) {
        long long x = a[j + k], y = a[j + k + i] * w[fl][i + k] % mod;
        a[j + k] = (x + y) % mod;
        a[j + k + i] = (x - y + mod) % mod;
      }
    }
  }
  if (fl != 1) {
    long long inv = qpow(n, mod - 2);
    for (int i = 0; i < n; i++) {
      (a[i] *= inv) %= mod;
    }
  }
}
void Mul(const long long A[], int lenA, const long long B[], int lenB,
         long long C[], int lenC) {
  static long long E[N], F[N];
  int x = min(lenA, lenC) + min(lenB, lenC), n = 1;
  while (n < x) {
    n <<= 1;
  }
  memset(E, 0, n << 3);
  memset(F, 0, n << 3);
  memcpy(E, A, min(lenA, lenC) << 3);
  memcpy(F, B, min(lenB, lenC) << 3);
  if (x <= 100) {
    memset(C, 0, lenC << 3);
    for (int i = 0; i < lenA; i++) {
      for (int j = 0; j < lenB; j++) {
        C[i + j] = (C[i + j] + E[i] * F[j]) % mod;
      }
    }
    return;
  }
  NTT(E, 1, n);
  NTT(F, 1, n);
  for (int i = 0; i < n; i++) {
    E[i] = E[i] * F[i] % mod;
  }
  NTT(E, -1, n);
  for (int i = 0; i < lenC && i < n; i++) {
    C[i] = E[i];
  }
  for (int i = n; i < lenC; i++) {
    C[i] = 0;
  }
}
void upd(vector<long long> &a) {
  while (a.size() > 1 && !a.back()) {
    a.pop_back();
  }
}
vector<long long> operator*(const vector<long long> &a,
                            const vector<long long> &b) {
  vector<long long> c(a.size() + b.size() - 1);
  Mul(a.data(), a.size(), b.data(), b.size(), c.data(), c.size());
  upd(c);
  return c;
}
vector<long long> operator+(const vector<long long> &a,
                            const vector<long long> &b) {
  vector<long long> c(max(a.size(), b.size()));
  for (size_t i = 0; i < max(a.size(), b.size()); i++) {
    c[i] = ((i < a.size() ? a[i] : 0) + (i < b.size() ? b[i] : 0)) % mod;
  }
  upd(c);
  return c;
}
vector<long long> operator-(const vector<long long> &a,
                            const vector<long long> &b) {
  vector<long long> c(max(a.size(), b.size()));
  for (size_t i = 0; i < max(a.size(), b.size()); i++) {
    c[i] = ((i < a.size() ? a[i] : 0) - (i < b.size() ? b[i] : 0) + mod) % mod;
  }
  upd(c);
  return c;
}
int n;
long long c[N], h[N];
long long F0[N], F1[N], H0[N], H1[N], H2[N];
inline void contr(long long *F, long long *G, long long *H, int l, int r) {
  vector<long long> a, b;
  int k = (l + r) >> 1;
  for (int i = l; i <= k; i++) {
    a.push_back(F[i]);
  }
  for (int i = 0; i <= r - l; i++) {
    b.push_back(G[i]);
  }
  vector<long long> c = a * b;
  for (int i = k + 1; i <= r && i - l < (int)c.size(); i++) {
    (H[i] += c[i - l]) %= mod;
  }
}
inline void Solve(int L, int R) {
  if (L == R) {
    F0[L] = (F0[L] + L * F0[0] * H0[L] + L * F1[0] * H1[L]) % mod;
    F1[L] = (F1[L] + L * F0[0] * H1[L] + L * F1[0] * H2[L]) % mod;
    return;
  }
  int Mid = (L + R) >> 1;
  Solve(L, Mid);
  contr(F0, H0, F0, L, R);
  contr(F1, H1, F0, L, R);
  contr(F0, H1, F1, L, R);
  contr(F1, H2, F1, L, R);
  Solve(Mid + 1, R);
}
int main() {
  NTTinit();
  n = read();
  for (int i = 1; i <= n; i++) {
    c[i] = i;
    c[i] = c[i] * c[i] % mod;
  }
  h[0] = h[2] = 1;
  for (int i = 0; i <= n; i += 2) {
    if (i >= 4) {
      h[i] = (h[i - 2] + h[i - 4]) % mod;
    }
    H0[i + 1] = h[i] * c[i] % mod;
    H1[i + 2] = h[i] * c[i + 1] % mod;
    H2[i + 3] = h[i] * c[i + 2] % mod;
  }
  long long ans = 0;
  F0[0] = 1;
  Solve(1, n);
  ans = (ans + F0[n]) % mod;
  memset(F0, 0, sizeof F0);
  memset(F1, 0, sizeof F1);
  F1[0] = 1;
  Solve(1, n);
  ans = (ans + F1[n]) % mod;
  printf("%d\n", (int)ans);
}
