N = int(input()) print(6**(N//2) % 998244353)