#include #include using namespace std; using mint = atcoder::modint998244353; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; cin >> n; vector> dp(n + 1, vector(3, 0)); vector p26(n, 1); for (int i = 1; i < n; i++) { p26[i] = p26[i - 1] * 26; } dp[0][0] = 1; mint ans = 0; for (int i = 0; i < n; i++) { for (int j = 0; j < 3; j++) { dp[i + 1][j] += dp[i][j] * 25; dp[i + 1][(j + 1) % 3] += dp[i][j]; if (j == 2) { ans += dp[i][j] * p26[n - i - 1]; } } } cout << ans.val() << endl; }