#include <map>
#include <set>
#include <queue>
#include <deque>
#include <vector>
#include <math.h>
#include <string>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <algorithm>

#define cer(x) if(debug) cerr << #x << ' ' << x << endl;
#define ff first
#define ss second
#define ll long long
#define ld long double
using namespace std;
int debug = 1;
const int N = 1e6 + 9;
ll p = 998244353;
ll ft[N];
ll rft[N];
ll erts[N];
ll modpow(ll a ,ll b ,ll p){
    if(b < 0) return 0;
    ll res = 1;
    while(b){
        if(b&1)
            res = (res * a) % p;
        a = (a * a) % p;
        b >>=1;
    }
    return res;
}
void full_fct(){
    ft[0] = 1;
    for(int i=1; i < N; i ++)
        ft[i] = (ft[i-1] * i) % p;
    rft[N-1] = modpow(ft[N-1], p-2, p);
    for(int i=N-2; i >= 0; i --)
        rft[i] = (rft[i+1] * (i + 1)) % p;
    return ;
}

void full_erts(){
    erts[2] = 1;
    for(int i=2; i < N ; i ++)
        if(erts[i] == 1)
            for(int j=i; j < N; j += i)
                erts[j] -= erts[j]/i;
    return ;
}

ll fb[N];
void full(){
    fb[0] = 0;
    fb[1] = 1;
    for(int i=2; i < N; i ++)
        fb[i] = (fb[i-1] + fb[i-2]) % p;
}


ll solve(){
    int n , l;
    full();
    full_fct();
    cin >> n;
    ll q = modpow(2 , n, p);
    ll iq = modpow(q, p-2, p);
    cout << (iq * fb[n]) % p;
    
    return 0;

}
int main() {
    int tt=1;
//    cin >> tt;
    while(tt--)
        solve();
    
}
