#include <atcoder/all>
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
using namespace atcoder;
using namespace std;
using mint = modint998244353;

struct Matrix {
    mint mat[2][2];
};

Matrix mul(Matrix a, Matrix b) {
    Matrix c;
    rep(i, 2) rep(j, 2) {
        c.mat[i][j] = 0;
        rep(k, 2) c.mat[i][j] += a.mat[i][k] * b.mat[k][j];
    }

    return c;
}

Matrix pow(Matrix a, ll n) {
    if (n == 1) return a;

    Matrix res;
    if (n % 2 == 0) {
        res = pow(a, n / 2);
        return mul(res, res);
    } else {
        res = pow(a, n - 1);
        return mul(res, a);
    }
}

int main() {
    cin.tie(0)->sync_with_stdio(0);

    ll N;
    cin >> N;

    Matrix A = {{{1, 1}, {1, 0}}};
    Matrix B = pow(A, N);
    cout << (B.mat[0][0] - 1).val() << "\n";

    return 0;
}