#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD = 998244353;
 
ll powMod(ll a,ll b){
    ll res = 1;
    while(b){
        if(b&1){
            res *= a;
            res %= MOD;
        }
        a *= a;
        a %= MOD;
        b >>= 1;
    }
    return res;
}

 
int main(){
    int n;
    ll res;
    cin>>n;
    vector<int> fi(n+1);
    fi[0] = 0;
    fi[1] = 1;
    for(int i=2;i<=n;i++){
        fi[i] = fi[i-1]+fi[i-2];
        fi[i] %= MOD;
    }
    res = (powMod(powMod(2,n),MOD-2)*fi[n])%MOD;
    cout<<res<<endl;
    return 0;
}