#include <bits/stdc++.h>
using namespace std;
const long double epsylon = 1e-9;
const std::string PROGRAM_NAME = "ivo";
long long mod = 998244353;
long long stepen(long long x, long long y) {
  long long res = 1;
  long long p = x;
  while (y) {
    if (y % 2) {
      res = (res * p) % mod;
    }
    p = (p * p) % mod;
    y /= 2;
  }
  return res;
}
long long rev(long long d) { return stepen(d, mod - 2); }
long long divi(long long a, long long d) { return (a * rev(d)) % mod; }
int main() {
  long long n;
  cin >> n;
  if (n < 3) {
    cout << n << endl;
    return 0;
  }
  vector<long long> fact(n + 1);
  fact[0] = 1;
  for (long long i = 1; i < (long long)fact.size(); ++i) {
    fact[i] = (fact[i - 1] * i) % mod;
  }
  vector<long long> cur;
  cur.push_back(divi(fact[n], 2LL));
  for (long long mul = 2; mul < n - 1; ++mul) {
    long long temp = divi(fact[n], fact[mul + 1]);
    temp = (temp * mul) % mod;
    cur.push_back(temp);
  }
  cur.push_back(n);
  reverse(cur.begin(), cur.end());
  long long ans = 0;
  for (int i = 0; i < (int)cur.size(); ++i) {
    ans = (ans + (cur[i] * ((long long)i + 1LL)) % mod) % mod;
  }
  cout << ans << endl;
  return 0;
}
