#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
const int N = 1 << 20;
int mul(int a, int b) { return (long long)a * b % mod; }
void inc(int& a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
void dec(int& a, int b) {
  a -= b;
  if (a < 0) a += mod;
}
int mi(int a, int b) {
  int s = 1;
  for (; b; b >>= 1, a = (long long)a * a % mod)
    if (b & 1) s = (long long)s * a % mod;
  return s;
}
namespace fft {
int rev[N];
int getup(int L) {
  int x = 1;
  for (; x < L; x <<= 1)
    ;
  return x;
}
void initrev(int L) {
  for (int i = 1; i <= L - 1; ++i)
    rev[i] = rev[i >> 1] >> 1 | ((i & 1) ? (L >> 1) : 0);
}
void print(vector<int> a, int L = -1) {
  if (L < 0) L = ((int)a.size());
  for (int i = 0; i <= L - 1; ++i) cout << a[i] << " ";
  cout << endl;
}
void fft(vector<int>& a, int tp) {
  int L = ((int)a.size());
  for (int i = 1; i <= L - 1; ++i)
    if (rev[i] < i) swap(a[i], a[rev[i]]);
  for (int i = 2; i <= L; i <<= 1) {
    int I = i >> 1, w = mi(3, (mod - 1) / i);
    if (tp < 0) w = mi(w, mod - 2);
    for (int j = 0; j < L; j += i)
      for (int k = j, W = 1; k < j + I; ++k, W = mul(W, w)) {
        int A = a[k], B = mul(a[k + I], W);
        a[k] = A;
        inc(a[k], B);
        a[k + I] = A;
        dec(a[k + I], B);
      }
  }
  if (tp < 0) {
    int w = mi(L, mod - 2);
    for (int i = 0; i <= L - 1; ++i) a[i] = mul(a[i], w);
  }
}
void inc(vector<int>& a, vector<int> b) {
  int L = ((int)a.size());
  if (((int)b.size()) > L) L = ((int)b.size()), a.resize(L);
  for (int i = 0; i <= ((int)b.size()) - 1; ++i)
    if ((a[i] += b[i]) >= mod) a[i] -= mod;
}
void dec(vector<int>& a, vector<int> b) {
  int L = ((int)a.size());
  if (((int)b.size()) > L) L = ((int)b.size()), a.resize(L);
  for (int i = 0; i <= ((int)b.size()) - 1; ++i)
    if ((a[i] -= b[i]) < 0) a[i] += mod;
}
vector<int> mul(vector<int> a, vector<int> b, int tp = 0) {
  int l = ((int)a.size()) + ((int)b.size()) - 1;
  int L = getup(l);
  initrev(L);
  a.resize(L);
  b.resize(L);
  fft(a, 1);
  if (tp)
    b = a;
  else
    fft(b, 1);
  for (int i = 0; i <= L - 1; ++i) a[i] = (long long)a[i] * b[i] % mod;
  fft(a, -1);
  a.resize(l);
  return a;
}
vector<int> moveR(vector<int> a, int x) {
  int L = ((int)a.size());
  a.resize(L += x);
  for (int i = L - 1; i >= x; --i) a[i] = a[i - x];
  for (int i = 0; i <= x - 1; ++i) a[i] = 0;
  return a;
}
vector<int> getni(vector<int> a, int x) {
  vector<int> s, S;
  s.resize(1);
  s[0] = mi(a[0], mod - 2);
  for (int L = 1; L < x; L <<= 1) {
    S = mul(a, mul(s, s, 1));
    S.resize(L << 1);
    for (int i = 0; i <= L - 1; ++i) (s[i] *= 2) %= mod;
    dec(s, S);
    s.resize(L << 1);
  }
  return s;
}
}  // namespace fft
using namespace fft;
vector<int> A0, A1, A2, A3, A4, B2, B3, C1, C2, D;
int n, ans;
void initA() {
  A0.clear();
  A0.resize(n);
  A0[0] = 1;
  A0[2] = 1;
  for (int i = 4; i < n; i += 2) A0[i] = (A0[i - 4] + A0[i - 2]) % mod;
  A1.resize(n);
  A2.resize(n);
  for (int i = 0; i <= n - 1; ++i) A1[i] = mul(A0[i], i);
  for (int i = 0; i <= n - 1; ++i) A2[i] = mul(A1[i], i);
  A3 = moveR(A0, 2);
  for (int i = 0; i <= ((int)A3.size()) - 1; ++i) A3[i] = mul(A3[i], mul(i, i));
  A4 = moveR(A0, 1);
  for (int i = 0; i <= ((int)A4.size()) - 1; ++i) A4[i] = mul(A4[i], mul(i, i));
}
void initB(vector<int> A, vector<int>& B) {
  vector<int> a = moveR(A, 1);
  for (int i = 0; i <= ((int)a.size()) - 1; ++i) a[i] = (mod - a[i]) % mod;
  a[0] = (a[0] + 1) % mod;
  B = getni(a, n);
}
void calc1(int& ans, vector<int> A, vector<int> B) {
  A = moveR(A, 1);
  for (int i = 0; i <= ((int)A.size()) - 1; ++i) A[i] = mul(A[i], i);
  A = mul(A, B);
  if (((int)A.size()) > n) inc(ans, A[n]);
}
void initC(vector<int> A) {
  A = moveR(A, 1);
  C1 = mul(mul(A, B3), mul(A, B2));
  C1.resize(n + 1);
  C2 = C1;
  for (int i = 0; i <= n; ++i) C2[i] = mul(C2[i], i);
}
void initD(vector<int> A, vector<int>& B) {
  for (int i = 0; i <= ((int)A.size()) - 1; ++i) A[i] = (mod - A[i]) % mod;
  A[0] = (A[0] + 1) % mod;
  B = getni(A, n);
}
void calc2(int& ans, vector<int> A, vector<int> B) {
  vector<int> S = mul(A, B);
  if (((int)S.size()) > n) inc(ans, S[n]);
}
int main() {
  cin >> n;
  initA();
  initB(A2, B2);
  calc1(ans, A2, B2);
  initB(A3, B3);
  calc1(ans, A3, B3);
  initC(A4);
  initD(C1, D);
  calc2(ans, C2, D);
  cout << ans << endl;
}
