MOD = 998244353 N = int(input()) exponent = N // 2 print(pow(6, exponent, MOD))