#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000 
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=998244353;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);


const int N=2e5+5;
int dp[N];

int solve(int n)
{
    if(dp[n]!=-1)
        return dp[n];
    if(n==0)
        return dp[n]=1;
    int ans=0;
    for(int i=1;i<=n;i+=2){
        ans+=solve(n-i);
        if(ans>=mod)
            ans-=mod;
    }
    return dp[n]=ans;
}


void solve()
{
    memset(dp,-1,sizeof(dp));
    int n;
    cin>>n;

    int e=0,o=0;
     dp[0]=1;
     e=1;
     for(int i=1;i<=n;i++)
     {
            if(i%2==1)
                dp[i]=e;
            else
                dp[i]=o;
            if(i%2==1)
                o+=dp[i];
            else
                e+=dp[i];
            e%=mod;
            o%=mod;
      //      cout<<dp[i]<<endl;
     }

    // for(int i=1;i<=n;i++)
    // {
    //     int x=solve(i);
    //  //   cout<<x<<endl;
    // }
    //cout<<solve(n)<<endl;
    int ans=(solve(n)*fp(fp(2,n),mod-2))%mod;
    cout<<ans<<endl;
}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); 
 srand(time(0));
 int t=1;
 //cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}

