#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
#include <set>
#include <map>
#include <stdio.h>
#include <deque>

#define MAXN 1000000000000000007
#define modu 998244353
#define ll long long
#define mp make_pair

using namespace std;

ll m, n, T, x, y, sum, r, k, maxi, p, q;
ll f[300009], rf[300009];

ll mul(ll a, ll b) {
    return (((ll)(a % modu) * (b % modu)) % modu);
}

ll bin_pow(ll a, ll n) {
    ll res = 1;
    while (n != 0) {
        if ((n & 1) == 1) {
            res = mul(res, a);
        }
        a = mul(a, a);
        n >>= 1;
    }
    return res;
}

ll inv(ll a) {
    return bin_pow(a, modu - 2);
}

ll cnk(ll n, ll k) {
    if(k > n) {
        return 0;
    }
    if(n == k || k == 0) {
        return 1;
    }
    if(k == 1) {
        return n;
    }
    ll p = mul(rf[n - k], rf[k]);
    return mul(f[n], p);
}


int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	f[0] = 1;
    rf[0] = 1;
    for(int i = 1; i <= 300005; ++i) {
        f[i] = mul(f[i - 1], i);
        rf[i] = mul(rf[i - 1], inv(i));
    }

	cin >> n;
	for(int i = 1; i <= n; ++i) {
		if(i % 2 == n % 2) {
			k = (n - i) / 2;
			sum = sum + cnk(k + i - 1, k);
			sum = sum % modu;
		}
	}
	
	//cout << sum << endl;
	q = bin_pow(2, n);
	ll ans = mul(sum, inv(q));
	cout << ans;
	
	return 0;
}