#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0;
  int f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + (ch ^ 48);
  return x * f;
}
void print(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x > 9) print(x / 10);
  putchar(x % 10 + '0');
}
const int N = 50010, mod = 998244353;
int n;
long long f[N] = {0,     0,      0,      0,       24,     4,
                  240,   204,    1316,   2988,    6720,   26200,
                  50248, 174280, 436904, 1140888, 3436404},
          r[17] = {0,   0,  4,   8,  -1,  16, -10, 4, -12,
                   -48, 26, -44, 15, -16, -4, -4,  -1};
int main() {
  n = read() + 1;
  for (int i = 17; i <= n; i++) {
    int x = 0;
    for (int j = 1; j <= 16; j++) f[i] = (f[i] + f[i - j] * r[j]) % mod;
  }
  print((f[n] % mod + mod) % mod), putchar('\n');
  return 0;
}
