#include using namespace std; #define rep(i,n) for(int i=0;i=0;--i) #define debug(output) if(debugFlag)cout<<#output<<"= "< P; const bool debugFlag=true; const lint linf=1.1e18;const int inf=1.01e9; constexpr int MOD=1000000007; templatebool chmax(T &a, const T &b) { if(a < b){ a = b; return 1; } return 0; } templatebool chmin(T &a, const T &b) { if(a > b){ a = b; return 1; } return 0; } #include using namespace atcoder; using mint = modint998244353; signed main(){ int n;cin>>n; vector> dp(n,{0,0,0}); dp[0][0]=1; rep(_z,n){ vector> ndp(n,{0,0,0}); rep(i,n){ rep(j,3){ int x=i+(j+1)/3; int y=(j+1)%3; ndp[i][j]+=dp[i][j]*25; ndp[x][y]+=dp[i][j]; } } swap(dp,ndp); } mint res=0; rep(i,n)rep(j,3){ res+=i*dp[i][j]; } cout<