#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long f = 1, lzx = 0;
  char c = getchar();
  while (c > '9' || c < '0') {
    if (c == '-') f = -f;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    lzx = lzx * 10 + c - '0';
    c = getchar();
  }
  return lzx * f;
}
const long long N = 1e5 + 10, mod = 998244353;
long long ans[N];
long long r[16] = {0,   4,  8,   -1, 16,  -10, 4,  -12,
                   -48, 26, -44, 15, -16, -4,  -4, -1},
          f[17] = {0,      0,      0,       24,      4,      240,
                   204,    1316,   2988,    6720,    26200,  50248,
                   174280, 436904, 1140888, 3436404, 8348748};
signed main() {
  long long n = read();
  if (n <= 16)
    cout << f[n] << endl;
  else {
    for (register long long i = 1; i <= 16; i++) ans[i] = f[i];
    for (register long long i = 17; i <= n; i++) {
      for (register long long j = 0; j < 16; j++)
        ans[i] = (ans[i] + r[j] * ans[i - j - 1] % mod + mod) % mod;
    }
    cout << ans[n] << endl;
  }
}
