#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 51, MOD = 998244353;
int n;
int g[100] = {0,         4,         8,         998244352, 16,        998244343,
              4,         998244341, 998244305, 26,        998244309, 15,
              998244337, 998244349, 998244349, 998244352};
int f[MAXN] = {0,    0,    0,     24,    4,      240,    204,     1316,
               2988, 6720, 26200, 50248, 174280, 436904, 1140888, 3436404};
inline int read() {
  register int num = 0, neg = 1;
  register char ch = getchar();
  while (!isdigit(ch) && ch != '-') {
    ch = getchar();
  }
  if (ch == '-') {
    neg = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    num = (num << 3) + (num << 1) + (ch - '0');
    ch = getchar();
  }
  return num * neg;
}
int main() {
  n = read();
  if (n <= 15) {
    return printf("%d\n", f[n]), 0;
  }
  for (register int i = 16; i <= n; i++) {
    for (register int j = 0; j < 16; j++) {
      f[i] = (f[i] + (long long int)g[j] * f[i - j - 1] % MOD) % MOD;
    }
  }
  printf("%d\n", f[n]);
}
