from collections import * from itertools import * from functools import * import math,sys input = sys.stdin.readline N = int(input()) mod = 998244353 M = N//2 print(pow(6,M,mod))