#include <bits/stdc++.h>
using namespace std;
const int N = 50010;
const int mod = 998244353;
int n;
const int a[16] = {0,   4,  8,   -1, 16,  -10, 4,  -12,
                   -48, 26, -44, 15, -16, -4,  -4, -1};
int f[N] = {0,    0,    0,     24,    4,      240,    204,     1316,
            2988, 6720, 26200, 50248, 174280, 436904, 1140888, 3436404};
int main() {
  for (int i = 16; i <= 50000; i++)
    for (int j = 0; j <= 15; j++)
      f[i] = ((f[i] + 1ll * a[j] * f[i - j - 1]) % mod + mod) % mod;
  scanf("%d", &n);
  printf("%d\n", f[n]);
  return 0;
}
