#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define endl '\n'
#define fix(x) cout << fixed << setprecision(x);
#define fastio \
std::ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
#pragma GCC optimize(2)
using namespace std;
const int N = 1e7 + 10, mod = 998244353;
int n, m;
int inv[N];
int fact[N], infact[N];
int A(int n, int m)
{
return fact[n] * infact[n - m] % mod;
}
void solve()
{
cin >> n;
fact[0] = infact[0] = inv[0] = inv[1] = 1;
for (int i = 2; i <= n; i++)
{
inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
}
for (int i = 1; i <= n; i++)
{
fact[i] = fact[i - 1] * i % mod;
infact[i] = 1ll * infact[i - 1] * inv[i] % mod;
}
int ans = 0;
for (int i = 1; i <= n / 2 + 1; i++)
{
ans += (fact[n - i] * (A(n - i, i - 1)) % mod) % mod;
ans %= mod;
}
cout << ans << endl;
}
signed main()
{
fastio;
int t = 1;
// cin >> t;
// init();
while (t--)
{
solve();
}
return 0;
}