N = int(input()) mod = 998244353 print(2 * pow(N + 1, mod - 2, mod) % mod)