//...START BY DOING WHAT IS NECESSARY,
//THEN WHAT IS POSSIBLE
//AND SUDDENLY YOU ARE DOING THE IMPOSSIBLE... 
//007naruto

#include <bits/stdc++.h>

       #define ll long long
       #define pb push_back
       #define mp make_pair
       #define F first
       #define S second
       #define pf push_front
       #define N   1000000000007
       using namespace std;
       const int mod = 998244353;

#define max(a,b) ((a) > (b) ? (a) : (b))
#define loop(i, begin, end) for(int i=(begin);i<(end);i++)
#define loop1(i, begin, end) for(int i=(begin);i<=(end);i++)
#define maxall(v) *max_element(all(v))
#define all(v) v.begin(),v.end()
#define minall(v) *min_element(all(v))
#define pb push_back
#define mk make_pair
#define REV(x) reverse(x.begin(),x.end())
#define SORT(v) sort(all(v))
#define UN(v) SORT(v), (v).earse(unique(all(v)),v.end())
#define common(a,b) SORT(a), SORT(b), a.erase(set_intersection(all(a),all(b),a.begin()),a.end())
#define uncommon(a,b) SORT(a), SORT(b), a.erase(set_symmetric_difference(all(a),all(b),a.begin()),a.end())
void fun()
{
  #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif
  //786
}
//ll phi(ll n) {ll result = n; for (ll p = 2; p * p <= n; ++p) {if (n % p == 0) {while (n % p == 0) n /= p;  result -= result / p; } } 
//if (n > 1) result -= result / n; return result; }
//ll mult(ll a, ll b, ll mod) 
//{ ll res = 0;a %= mod; while (b) { if (b & 1) res = (res + a) % mod;  a = (2 * a) % mod;  b >>= 1; // b = b / 2 } 
//return res; } 
ll gcd(ll a,ll b){  if(b==0) return a;  return gcd(b,a%b);}
ll lcm(ll a,ll b){return (a/gcd(a,b)*b);}
ll ncr(ll n,ll r){ll res=1;if(r>n)return 0;if(r>n-r)r=n-r;for(ll i=0;i<r;i++){res*=(n-i);res/=(i+1);}return res;}
vector<ll> factors(ll n) {vector<ll> f;for (ll x = 2; x*x <= n; x++) {while (n%x == 0) {f.push_back(x);n /= x;}}if (n > 1) f.push_back(n);return f;}
ll powmod (ll a, ll b) {ll ans = 1;while (b) {if (b & 1) {ans = ans * a % mod;}a = a * a % mod;b>>=1;}return ans;}
ll inv (ll x) {return powmod(x,mod-2);}

ll cat(ll n){ll final = 1;for (int i=0; i<n; i++) {final = final * (2 * n-i) % mod * inv(1 + i) % mod;}final = final * inv(1+n)%mod;return final;}
//struct cor{int x,y;};
ll bin(ll x, ll y) {if (y == 0) {return 1;}ll u = bin(x, y/2);if (y % 2 == 0) { return u*u % mod;}else {return u*u % mod * x % mod;}}
ll primefact[1000006];
const int MAX = 1e6;
bool v[1000006];
int len, sp[1000006];
ll pp[1000006];

void smallp()
{

  primefact[1]=1;

  for(ll i=2;i<=1000005;i++)
    primefact[i]=i;

  for (ll i = 2; i*i <=1000005 ; i++)
{
if(primefact[i]==i)
{
  for(ll j=i*i;j<=1000005;j+=i)
    if(primefact[j]==j)
    {
      primefact[j]=i;
    }
}

  }
}
  int nooffact(ll n)
  {

    if(n==1)return 1;

    int ff=primefact[n];
    int baki=n/ff;
int c=1;
int ans=1;
    while(baki!=1)
    {
if(primefact[baki]==ff)
{
  c=c+1;
}
else{
  ff=primefact[baki];
  ans=ans*(c+1);
  c=1;
}

baki=baki/primefact[baki];
}


return ans*(c+1);
  }

/*void Sieve(){
  for (int i = 2; i < MAX; i += 2)  {sp[i] = 2;pp[2]++;}//even numbers have smallest prime factor 2
  for (ll i = 3; i < MAX; i += 2){
    if (!v[i]){sp[i] = i;
      for (ll j = i; (j*i) < MAX; j += 2){
        if (!v[j*i])  v[j*i] = true, sp[j*i] = i,pp[i]++;
      }
    }
  }
}*/
//cor C[7007];
//bool prime[1000005];
//void pcheck(){ll i,j;for(int i=2;i<=1e6;++i){if(!prime[i]){for(int j=i+i;j<=1e6;j+=i)prime[j]=1;}}}
//bool pcheck(ll a){if(a == 2)return true;for(ll i=2;i<=sqrt(a);i++){if(a%i)continue;return false;}return true;}
const int MaxN = 4e5 + 10;
//int cD(ll n){ return floor(log10(n) + 1);} 

const int MAXN = 120 * 1000;
int cD(ll n){ return floor(log10(n) + 1);} 



ll front[MaxN]={0},back[MaxN]={0};
ll last=N;

ll  x,y,x2,x3,sum=0,sum2=0,i,j,g,t,mid; 

ll d1=0,d2=0;
ll n,k,q,c,r,m;

ll ans,l;
//deque<int> a, b;

//map < pair<int ,int >, int > bi1,bi2;
long double  n1,n2, nc ,pc ,h,zc,l2,l3,l4;
const int No = 3e5 + 5;
 pair<ll,ll >p[No];
#define pi 3.1415926535
ll an,bn,cn,dn;
string s;
  
int main()
{
fun();
  
    ios_base::sync_with_stdio(false);
  cin>>n;

ll a[n];
a[1]=1;
a[2]=1;

for(int i=3;i<=n;i++)
{a[i]=a[i-1]+a[i-2];a[i]=a[i]%mod;}


ll k=powmod(2,n);
ll in =inv(k);
cout<<(a[n]*in)%mod;


return 0;

}


