from typing_extensions import Self class Modint: MOD = 998244353 def __init__(self, value: int) -> None: self.num = value def __str__(self) -> str: return str(self.num) __repr__ = __str__ def __add__(self, __x: Self | int) -> Self: if isinstance(__x, Modint): return Modint((self.num + __x.num)) return Modint(self.num + __x) def __sub__(self, __x: Self | int) -> Self: if isinstance(__x, Modint): return Modint(self.num - __x.num) return Modint(self.num - __x) def __mul__(self, __x: Self | int) -> Self: if isinstance(__x, Modint): return Modint(self.num * __x.num) return Modint(self.num * __x) __radd__ = __add__ __rmul__ = __mul__ def __rsub__(self, __x: Self | int) -> Self: if isinstance(__x, Modint): return Modint(__x.num - self.num) return Modint(__x - self.num) def __pow__(self, __x: Self | int) -> Self: if isinstance(__x, Modint): return Modint(pow(self.num, __x.num, Modint.MOD)) return Modint(pow(self.num, __x, Modint.MOD)) def __rpow__(self, __x: Self | int) -> Self: if isinstance(__x, Modint): return Modint(pow(__x.num, self.num, Modint.MOD)) return Modint(pow(__x, self.num, Modint.MOD)) @property def num(self) -> int: return self.__num @num.setter def num(self, value: int) -> int: self.__num = value % Modint.MOD def main(): N = int(input()) num_square_of_2 = Modint(N // 2) print(Modint(6) ** num_square_of_2) if __name__ == "__main__": main()