def main(): n = int(input()) mod = 998244353 print(pow(6, n // 2, mod)) if __name__ == "__main__": main()