import numpy as np def mat_power(m: np.ndarray, n: int, mod: int) -> np.ndarray: if n == 0: return np.identity(len(m), dtype=m.dtype) res = mat_power(m, n // 2, mod) res = res @ res % mod if n % 2 == 1: res = res @ m % mod return res MOD = 998244353 N = int(input()) m = np.array([[1, 1], [1, 0]]) res = mat_power(m, N-1, MOD) @ [[1], [0]] res %= MOD ans = (res[0][0] + res[1][0] - 1) % MOD print(ans)