#include <iostream>
#include <vector>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <algorithm>

using namespace std;

typedef pair<int, int> ii;
typedef long long ll;

ll MOD = 998244353;

ll gcdExtended(ll a, ll b, ll* x, ll* y);

ll modInverse(ll a, ll m)
{
    ll x, y;
    ll g = gcdExtended(a, m, &x, &y);
    ll res = (x % m + m) % m;
    return res;
}

ll gcdExtended(ll a, ll b, ll* x, ll* y)
{
    if (a == 0)
    {
        *x = 0, *y = 1;
        return b;
    }
  
    ll x1, y1;
    ll gcd = gcdExtended(b % a, a, &x1, &y1);

    *x = y1 - (b / a) * x1;
    *y = x1;
  
    return gcd;
}
 

int main(){
    ll n;
    cin >> n;
    long long dp[n];
    dp[0] = 0;
    ll par = 0, nepar = 0;
    ll x = 1;
    for (int i = 1; i <= n; i++){
        x *= 2;
        x %= MOD;
        if (i%2 == 1){
            dp[i] = par + 1;
            nepar += dp[i];
        }
        else{
            dp[i] = nepar;
            par += dp[i];
        }
        dp[i] %= MOD;
        par %= MOD;
        nepar %= MOD;
    }
    cout << (dp[n]*modInverse(x, MOD))%MOD << endl;
    return 0;
}


