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