#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define ppb pop_back
typedef long long ll;

const ll MOD = 998244353;

ll power(ll a, ll b)
{
	ll ans = 1;
	while (b)
	{
		if (b & 1)
			ans = (ans * a) % MOD;
		b /= 2;
		a = (a * a) % MOD;
	}
	return ans;
}

ll modinv(ll n)
{
	return power(n, MOD - 2);
}


void solve() {

	int n;
	cin >> n;
	vector<ll> dp(n + 1);

	dp[0] = 1;
	ll pe = 1;
	ll po = 0;

	for (int i = 1; i <= n + 1; i++) {
		dp[i] = i % 2 == 0 ? po % MOD : pe % MOD;
		dp[i] %= MOD;
		po += i % 2 == 1 ? dp[i] : 0;
		pe += i % 2 == 0 ? dp[i] : 0;
		po %= MOD;
		pe %= MOD;
	}
	ll ans = dp[n];
	ans *= modinv(power(2, n));
	ans %= MOD;

	cout << ans;

}

int main() {

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

#ifndef ONLINE_JUDGE
	// for getting input from input.txt
	freopen("input.txt", "r", stdin);
	// for writing output to output.txt
	freopen("output.txt", "w", stdout);
#endif

	int t = 1;
	//cin >> t;
	while (t-- > 0) {
		solve();
	}

	return 0;
}
