#include <bits/stdc++.h>
using namespace std;
set<long long> fax;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long power(long long x, unsigned long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
void solve() {
  long long n;
  cin >> n;
  long long a[n + 1];
  a[0] = 1;
  for (int i = (1); i <= (n); i++) (a[i] = (a[i - 1] * i) % (998244353));
  long long ans = 1;
  for (int i = (n); i >= (0); i--) {
    long long temp = ((a[n - i] - 1) * a[n]) % (998244353);
    temp *= power(a[n - i], (998244353) - 2, (998244353));
    temp %= (998244353);
    ans += temp;
    ans %= (998244353);
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int TC = 1;
  while (TC--) {
    solve();
    cout << endl;
  }
}
