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