#include<bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;
using ui = unsigned int;
using ull = unsigned long long;

clock_t start;

double runtime() {
	return (double) (clock() - start) / CLOCKS_PER_SEC;
}



typedef pair<int, int> pii;

const ll MOD = 998244353;
vector<ll> fact;

ll pow(ll a, ll p) {
	ll prod = 1;
	while (p > 0) {
		if (p & 1) {
			prod = prod * a % MOD;
		}
		a = a * a % MOD;
		p >>= 1;
	}
	return prod;
}
ll inv(ll a) {
	return pow(a, MOD - 2);
}
ll c(int n, int r) {
	if (r < 0 || r > n) return 0;
	return fact[n] * inv(fact[n - r] * fact[r] % MOD) % MOD;
}

ll gcd(ll a, ll b) {
	if (b == 0) 
		return a;
	return gcd(b, a % b);
}


void solve() {
	ll n;
	cin >> n;
	vector<ll> dp(n + 1);
	dp[1] = 1, dp[2] = 1;
	for (int i = 3; i <= n; ++i) {
		dp[i] = (dp[i - 2] + dp[i - 1]) % MOD;
	}
	cout << dp[n] * inv(pow(2LL, n)) % MOD << '\n';
}

int main() {
	start = clock();
	#ifdef LOCAL

	freopen("in1.txt", "r", stdin);
	freopen("op1.txt", "w", stdout);

	#endif
	ios :: sync_with_stdio(false);
	cin.tie(0);
	int tt = 1;
	// cin >> tt;
	while (tt--) {
		solve();
	}
	return 0;

}				