# WA(?) import sys input = sys.stdin.readline MOD = 998244353 def get_fib(n): return int(1 / (5 ** 0.5) * (((1 + 5 ** 0.5) / 2) ** n - ((1 - 5 ** 0.5) / 2) ** n)) % MOD print(get_fib(int(input())))