N=int(input()) mod=998244353 DP=[0]*(N+2) DP[0]=1 for i in range(N): NDP=[0]*(N+2) for j in range(N+1): x=DP[j] NDP[j+1]+=x NDP[j]+=x*25 DP=[ndp%mod for ndp in NDP] ANS=0 for i in range(N+2): ANS+=DP[i]*(i//3) ANS%=mod print(ANS)