#include <bits/stdc++.h>
using namespace std;
int f[50010], n;
const int a[17] = {0,         0,         4,  8,         998244352,
                   16,        998244343, 4,  998244341, 998244305,
                   26,        998244309, 15, 998244337, 998244349,
                   998244349, 998244352};
const int b[16] = {0,      0,       24,      4,      240,   204,
                   1316,   2988,    6720,    26200,  50248, 174280,
                   436904, 1140888, 3436404, 8348748};
int main() {
  cin >> n;
  for (int i = 1; i < 17; i++) f[i] = b[i - 1];
  for (int i = 17; i <= n; i++)
    for (int j = 1; j < 17; j++)
      f[i] = (f[i] + 1ll * f[i - j] * a[j] % 998244353ll) % 998244353ll;
  cout << f[n] << '\n';
}
