#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define f(a,b,c,d) for(ll a=b; a<c; a+=d)
#define MOD 1000000007
#define pb push_back
#define umap unordered_map
#define uset unordered_set
#define pq priority_queue

ll mod = 998244353;
  
ll power(ll x, ll y, ll m) 
{ 
    if (y == 0) 
        return 1; 
    ll p = power(x, y / 2, m) % m; 
    p = (p * p) % m; 
  
    return (y % 2 == 0) ? p : (x * p) % m; 
} 

ll modInverse(ll a, ll m) 
{ 
	return power(a, m - 2, m); 
} 

void solve()
{
	ll n;
	cin >> n;
	if(n == 1)
	{
		ll y = 2;
		ll y1 = modInverse(y, mod);
		cout << y1;
		return;
	}
	if(n == 2)
	{
		ll y = 4;
		ll y1 = modInverse(y, mod);
		cout << y1;
		return;
	}
	ll dp[n+1];
	dp[1] = 1;
	dp[2] = 1;
	f(i,3,n+1,1)
	{
		dp[i] = (dp[i-1] + dp[i-2]) % mod;
	}
	ll x = dp[n];
	ll y = power(2,n,mod);
	ll y1 = modInverse(y, mod);
	y = (x * y1) % mod;
	cout << y;
}

signed main()
{

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	ll t = 1;
	//cin >> t;
	while (t--)
		solve();
}
