#include <iostream>
using namespace std;
int main(){
    long long int n,aa=499122177,ans=1;
    cin >> n;
    long long int a[n+1];
    a[1]=1;
    a[2]=1;
    for(int i=1;i<=n;i++){
        ans=(ans*aa)%998244353;
        if(i>2)
           a[i]=(a[i-1]+a[i-2])%998244353;
    }
    cout << (ans*a[n])%998244353 << endl;
    return 0;
}
