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