#include using namespace std; using ll=long long; #define rep(i,n) for(int i=0;i=0;i--) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} const ll MOD=998244353; int n; ll dp[3010][1010][3]; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cin>>n; dp[0][0][0]=1; rep(i,n){ rep(j,n/3+1){ dp[i+1][j+1][0]+=dp[i][j][2]; dp[i+1][j+1][0]%=MOD; dp[i+1][j][1]+=dp[i][j][0]; dp[i+1][j][2]+=dp[i][j][1]; rep(k,3){ dp[i+1][j][k]+=25*dp[i][j][k]; dp[i+1][j][k]%=MOD; } } } ll ans=0; rep(i,n/3+1){ rep(j,3){ ans+=i*dp[n][i][j]; ans%=MOD; } } cout<