#define taskname "test"

#include <bits/stdc++.h>

using namespace std;

#define sz(x) (int)x.size()
#define fi first
#define se second

typedef long long lli;
typedef pair<int, int> pii;

const int mod = 998244353;
const int maxn = 2e5 + 5;

int n;

int pow2[maxn];
int inv2[maxn];

int f[maxn];

int powmod(int x, int k)
{
    if(k == 0) return 1;
    int t = powmod(x, k / 2);
    if(k % 2 == 0) return t * 1LL * t % mod;
    else return t * 1LL * t % mod * x % mod;
}

void prep()
{
    pow2[0] = 1;
    for(int i = 1; i < maxn; ++i)
        pow2[i] = pow2[i - 1] * 2LL % mod;
    inv2[maxn - 1] = powmod(pow2[maxn - 1], mod - 2);
    for(int i = maxn - 2; i >= 0; --i)
        inv2[i] = inv2[i + 1] * 2LL % mod;
}

void read_input()
{
    cin >> n;
}

int add(int x, int y)
{
    x += y;
    if(x >= mod) x -= mod;
    return x;
}

void solve()
{
    f[0] = 1;
    int even, odd;
    even = odd = 0;
    even = add(even, f[0] * 1LL * pow2[0] % mod);
    for(int i = 1; i <= n; ++i)
    {
        if(i & 1)
        {
            f[i] = inv2[i] * 1LL * even % mod;
            odd = add(odd, f[i] * 1LL * pow2[i] % mod);
        }
        else
        {
            f[i] = inv2[i] * 1LL * odd % mod;
            even = add(even, f[i] * 1LL * pow2[i] % mod);
        }
    }
    cout << f[n] << '\n';
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    prep();
    read_input();
    solve();
}

