#include <bits/stdc++.h>
using namespace std;
#define mod 998244353
int pot(int v, int n){
	if(n == 1)
		return v;
	int u = pot(v, n/2);
	if(n % 2)
		return (long long) u * u % mod * v % mod;
	return (long long) u * u % mod;
}
int main(){
	int n, a = 1, b = 1, i;
	a = b = 1;
	cin >> n;
	for(i = 2; i < n; i++){
		swap(a, b);
		b = (a + b) % mod;
	}
	cout << (long long) b * pot(pot(2, mod - 2), n) % mod << '\n';
}
