#include "bits/stdc++.h"
using namespace std;
using i64 = long long;
constexpr int P = 998244353;
i64 *fac, *ifac;
i64 power(i64 a, i64 b, int p = P) {
i64 res = 1;
for (; b; b >>= 1, a = a * a % p) {
if (b & 1) {
res = res * a % p;
}
}
return res;
}
i64 inv(i64 x) {
return power(x, P - 2, P);
}
void init(int N) {
fac = new i64 [N + 1];
ifac = new i64 [N + 1];
fac[0] = 1;
for (int i = 1; i <= N; i++) {
fac[i] = fac[i - 1] * i % P;
}
ifac[N] = inv(fac[N]);
for (int i = N - 1; i >= 0; i--) {
ifac[i] = ifac[i + 1] * (i + 1) % P;
}
}
i64 C(int n, int m) {
if (m < 0 || m > n || n < 0) {
return 0;
}
return fac[n] * ifac[m] % P * ifac[n - m] % P;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
init(1E7);
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
ans = (ans + C(n - i, i - 1) * C(n - i, n - i) % P) % P;
}
cout << ans << '\n';
return 0;
}