Let n be an integer. Consider all permutations on integers 1 to n in lexicographic order, and concatenate them into one big sequence p. For example, if n = 3, then p = [1, 2, 3, 1, 3, 2, 2, 1, 3, 2, 3, 1, 3, 1, 2, 3, 2, 1]. The length of this sequence will be n ⋅ n!.

Let 1 ≤ i ≤ j ≤ n ⋅ n! be a pair of indices. We call the sequence (p_i, p_{i+1}, ..., p_{j-1}, p_j) a subarray of p. Its length is defined as the number of its elements, i.e., j - i + 1. Its sum is the sum of all its elements, i.e., ∑_{k=i}^j p_k. 

You are given n. Find the number of subarrays of p of length n having sum (n(n+1))/(2). Since this number may be large, output it modulo 998244353 (a prime number). 

Input

The only line contains one integer n (1 ≤ n ≤ 10^6), as described in the problem statement.

Output

Output a single integer — the number of subarrays of length n having sum (n(n+1))/(2), modulo 998244353.

Examples

Input


3


Output


9


Input


4


Output


56


Input


10


Output


30052700

Note

In the first sample, there are 16 subarrays of length 3. In order of appearance, they are:

[1, 2, 3], [2, 3, 1], [3, 1, 3], [1, 3, 2], [3, 2, 2], [2, 2, 1], [2, 1, 3], [1, 3, 2], [3, 2, 3], [2, 3, 1], [3, 1, 3], [1, 3, 1], [3, 1, 2], [1, 2, 3], [2, 3, 2], [3, 2, 1]. 

Their sums are 6, 6, 7, 6, 7, 5, 6, 6, 8, 6, 7, 5, 6, 6, 7, 6. As (n(n+1))/(2) = 6, the answer is 9.
#include <bits/stdc++.h>
using namespace std;
long double TL = 1.0;
bool is_tl = 0;
long long CALLS = 0;
inline bool IS() {
  if (++CALLS == 1000) {
    CALLS = 0;
    is_tl |= clock() > (TL - 0.1) * CLOCKS_PER_SEC;
  }
  return is_tl;
}
template <typename T1, typename T2>
inline void amin(T1 &a, T2 b) {
  if (a > b) a = b;
}
template <typename T1, typename T2>
inline void amax(T1 &a, T2 b) {
  if (a < b) a = b;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, pair<T1, T2> &p) {
  os << p.first << ' ' << p.second << endl;
  return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, vector<T> &v) {
  for (auto &u : v) os << u << ' ';
  os << endl;
  return os;
}
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const long long N = 1e6 + 7, NS = 2e3 + 7, lg = 20, sq = 550, inf = 2e9 + 7,
                SM = 1e2 + 7;
const long double eps = 1e-9;
long long hash_mod[4] = {1000000007, 998244353, 1000000009, 999999937},
          mod = hash_mod[rnd() % 4];
long long hash_pows[4] = {179, 239, 1007, 2003}, P = hash_pows[rnd() % 4];
long long fac[N];
long long sum(long long a, long long b) {
  a += b;
  if (a > mod) a -= mod;
  return a;
}
long long mult(long long a, long long b) { return (a * b) % mod; }
long long binpow(long long a, long long p) {
  long long res = 1;
  while (p) {
    if (p & 1) res = mult(res, a);
    a = mult(a, a);
    p /= 2;
  }
  return res;
}
long long inv(long long first) { return binpow(first, mod - 2); }
long long cnk(long long n, long long k) {
  long long res = mult(fac[n], inv(fac[k]));
  res = mult(res, inv(fac[n - k]));
  return res;
}
void solve() {
  mod = hash_mod[1];
  fac[0] = 1;
  for (long long i = 1; i < N; i++) fac[i] = mult(fac[i - 1], i);
  long long n, ans = 0;
  cin >> n;
  ans = sum(ans, fac[n]);
  for (long long k = 1; k < n; k++) {
    long long cur = mult(cnk(n, k), fac[k]);
    cur = mult(cur, fac[n - k] - 1);
    ans = sum(ans, cur);
  }
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
