def main(): N = int(input()) num = 998244353 print((6 ** (N // 2)) % num) if __name__ == '__main__': main()