#include <bits/stdc++.h>   using namespace std;   const int mod = 998244353, N = 200200, G = 3, Gi = 332748118;   long long power(long long base, long long b) {     long long ret = 1;     while (b) {       if (b & 1) ret = ret * base % mod;       base = base * base % mod;       b >>= 1;     }     return ret;   }   int limit, len, last = -1, pos[N];   long long G0[N], G1[N], G2[N], g[N], F0[N], F1[N], F2[N];   long long w[N];   void getlen(int n) {     limit = 1, len = 0;     while (limit < n) limit <<= 1, ++len;     w[0] = 1;     long long gg = power(G, (mod - 1) / limit);     for (int i = 1; i < limit; ++i) {       pos[i] = (pos[i >> 1] >> 1) | ((i & 1) << (len - 1));       w[i] = w[i - 1] * gg % mod;     }   }   void ntt(long long *a, int n, int type) {     for (int i = 0; i < limit; ++i)       if (i < pos[i]) swap(a[i], a[pos[i]]);     for (int mid = 1; mid < limit; mid <<= 1)       for (int j = 0, r = mid << 1; j < limit; j += r)         for (int k = 0; k < mid; ++k) {           long long x = a[j + k], y = w[limit / r * k] * a[j + mid + k] % mod;           a[j + k] = (x + y) % mod;           a[j + mid + k] = (x - y + mod) % mod;         }     if (type == -1) {       reverse(a + 1, a + limit);       long long inv = power(limit, mod - 2);       for (int i = 0; i < limit; ++i) a[i] = inv * a[i] % mod;     }   }   long long f[N], h[N], tmp[N];   void calc(long long *a, int n, long long *b, int m, long long *c, int nm = -1) {     if (nm == -1) nm = n + m - 1;     getlen(nm);     for (int i = 0; i < n; ++i) f[i] = a[i];     for (int i = n; i < limit; ++i) f[i] = 0;     for (int i = 0; i < m; ++i) h[i] = b[i];     for (int i = m; i < limit; ++i) h[i] = 0;     ntt(f, nm, 1), ntt(h, nm, 1);     for (int i = 0; i < limit; ++i) f[i] = f[i] * h[i] % mod;     ntt(f, nm, -1);     for (int i = 0; i < nm; ++i) c[i] = f[i];   }   void CDQ(int l, int r) {     if (l == r) {       F0[l] = (F0[l] + G0[l]) % mod;       F1[l] = (F1[l] + G1[l]) % mod;       F2[l] = (F2[l] + G2[l]) % mod;       return;     }     int mid = (l + r) >> 1;     CDQ(l, mid);     calc(F0 + l, mid - l + 1, G0, r - l + 1, tmp + l, r - l + 1);     for (int i = mid + 1; i <= r; ++i) F0[i] = (F0[i] + tmp[i]) % mod;     calc(F0 + l, mid - l + 1, G1, r - l + 1, tmp + l, r - l + 1);     for (int i = mid + 1; i <= r; ++i) F1[i] = (F1[i] + tmp[i]) % mod;     calc(F1 + l, mid - l + 1, G1, r - l + 1, tmp + l, r - l + 1);     for (int i = mid + 1; i <= r; ++i) F0[i] = (F0[i] + tmp[i]) % mod;     for (int i = mid + 1; i <= r; ++i) F2[i] = (F2[i] + tmp[i]) % mod;     calc(F1 + l, mid - l + 1, G2, r - l + 1, tmp + l, r - l + 1);     for (int i = mid + 1; i <= r; ++i) F1[i] = (F1[i] + tmp[i]) % mod;     calc(F2 + l, mid - l + 1, G2, r - l + 1, tmp + l, r - l + 1);     for (int i = mid + 1; i <= r; ++i) F2[i] = (F2[i] + tmp[i]) % mod;     CDQ(mid + 1, r);   }   int n;   int main() {     scanf( %d , &n);     g[0] = g[2] = 1;     for (int i = 4; i <= n; ++i) g[i] = (g[i - 2] + g[i - 4]) % mod;     for (int i = 1; i <= n; ++i)       G0[i] = 1LL * (i - 1) * (i - 1) % mod * g[i - 1] % mod;     for (int i = 2; i <= n; ++i)       G1[i] = 1LL * (i - 1) * (i - 1) % mod * g[i - 2] % mod;     for (int i = 3; i <= n; ++i)       G2[i] = 1LL * (i - 1) * (i - 1) % mod * g[i - 3] % mod;     CDQ(1, n);     long long Ans = 1LL * n * (G0[n] + G2[n]) % mod;     for (int i = 2; i <= n - 2; ++i) {       Ans = (Ans + (G0[i] * F0[n - i] % mod + 2LL * G1[i] * F1[n - i] % mod +                     G2[i] * F2[n - i] % mod) *                        (long long)i % mod) %             mod;     }     printf( %lld n , (Ans % mod + mod) % mod);     return 0;   }