#import main(){long N;scanf("%ld",&N);printf("%ld",atcoder::pow_mod(6,N/2,998244353));}