N = gets.to_i
M = 998244353

def mpow(x, n)
  ret = 1
  while n > 0
    if n.even?
      x = x * x % M
      n >>= 1
    else
      ret = ret * x % M
      n -= 1
    end
  end
  ret
end

@f = [1, 1]
(2 .. N).each{|i| @f[i] = @f[i - 1] * i % M}
@rf = []; @rf[N] = mpow(@f[N], M - 2)
(N - 1).downto(0){|i| @rf[i] = @rf[i + 1] * (i + 1) % M}
@fn = @f[N]
bnom = ->(k){@fn * @rf[N - k] * @rf[k] % M}
x, t = 0, 1
N.downto(N/2 + 1) do |k|
  x = (x + bnom[k]*t) % M
  t = 2*t % M
end
puts mpow(3, N) - (2*x) % M