/* * 確率の極限に帰着できるので収束する * wolfram alphaにぶち込んで実験... */ #include using namespace std; using ll=long long; ll modinv(ll a, ll mod) { ll b = mod, u = 1, v = 0; while (b) { ll t = a/b; a -= t * b, swap(a, b); u -= t * v, swap(u, v); } u %= mod; if (u < 0) u += mod; return u; } int main(){ int n; cin >> n; assert(1 <= n && n <= 200000); cout << (2 * modinv(n+1,998244353)) % 998244353 << '\n'; }