# require "template" lib C fun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64 end class String def to_i64 C.strtoll(self, nil, 10) end end # require "math/powmod" struct Int def powmod(exp : self, mod : self) n = self % mod res = typeof(self).new(1) while exp > 0 res = res * n % mod if exp.odd? n = n * n % mod exp >>= 1 end res end end n = read_line.to_i64 puts 6i64.powmod(n // 2, 998244353)