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