## https://yukicoder.me/problems/no/1310 MOD = 998244353 class CombinationCalculator: """ modを考慮したPermutation, Combinationを計算するためのクラス """ def __init__(self, size, mod): self.mod = mod self.factorial = [0] * (size + 1) self.factorial[0] = 1 for i in range(1, size + 1): self.factorial[i] = (i * self.factorial[i - 1]) % self.mod self.inv_factorial = [0] * (size + 1) self.inv_factorial[size] = pow(self.factorial[size], self.mod - 2, self.mod) for i in reversed(range(size)): self.inv_factorial[i] = ((i + 1) * self.inv_factorial[i + 1]) % self.mod def calc_combination(self, n, r): if n < 0 or n < r or r < 0: return 0 if r == 0 or n == r: return 1 ans = self.inv_factorial[n - r] * self.inv_factorial[r] ans %= self.mod ans *= self.factorial[n] ans %= self.mod return ans def calc_permutation(self, n, r): if n < 0 or n < r: return 0 ans = self.inv_factorial[n - r] ans *= self.factorial[n] ans %= self.mod return ans def main(): N = int(input()) combi = CombinationCalculator(N, MOD) answer = 0 for n in range(N): # s_1 = +として「変化がある点のかずの組み合わせ」で主客転倒を行う if n % 2 == 0: E = - (N - 2 * n) else: E = - (N - 2 - 2 * n) absE = abs(E) ans = pow(2, absE, MOD) c = combi.calc_combination(N - 1, n) answer += (ans * c) % MOD answer %= MOD answer *= 2 answer %= MOD print(answer) if __name__ == "__main__": main()