#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<cctype>
#include<ctime>
#include<iostream>
#include<string>
#include<map>
#include<queue>
#include<stack>
#include<set>
#include<vector>
#include<iomanip>
#include<list>
#include<bitset>
#include<sstream>
#include<fstream>
#include<complex>
#include<algorithm>
#if __cplusplus >= 201103L
#include <unordered_map>
#include <unordered_set>
#endif
#define int long long
using namespace std;
const int inv2 = 499122177;
const int mod = 998244353;
int fab[2000010];
signed main(){
	ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	int n;
	cin>>n;
	fab[1]=1,fab[2]=1;
	for(int i=3;i<=n;i++) fab[i]=(fab[i-1]+fab[i-2])%mod;
	for(int i=1;i<=n;i++){
		fab[n]=(inv2*fab[n])%mod;
	}
	cout<<fab[n]<<endl;
    return 0;
}
