#line 2 "/Users/baluteshih/coding/cplibrary/default_code.hpp" #line 2 "/Users/baluteshih/coding/cplibrary/assumption.hpp" #include #include #line 4 "/Users/baluteshih/coding/cplibrary/default_code.hpp" using namespace std; typedef long long ll; typedef pair pii; typedef pair pll; #define X first #define Y second #define SZ(a) ((int)a.size()) #define ALL(v) v.begin(), v.end() template concept PrintableContainer = requires(T& a) { a.begin(); a.end(); } && !std::convertible_to, std::string_view>; template ostream& operator<<(ostream& os, const pair &a); template std::ostream& operator<<(std::ostream& os, const T& a); template ostream& operator<<(ostream& os, const pair &a) { os << "(" << a.first << ", " << a.second << ")"; return os; } template std::ostream& operator<<(std::ostream& os, const T& a) { os << "[ "; bool first = true; for (const auto& item : a) { if (!first) os << ", "; os << item; first = false; } return os << " ]"; } #ifdef bbq #include #define safe cerr<<__PRETTY_FUNCTION__<<" line "<<__LINE__<<" safe\n" #define sepline sepline_() #define debug(a...) debug_(#a, a) #define orange(a...) orange_(#a, a) void debug_(auto s, auto ...a) { cerr << "\e[1;32m(" << s << ") = ("; int f = 0; (..., (cerr << (f++ ? ", " : "") << a)); cerr << ")\e[0m\n"; } void orange_(auto s, auto L, auto R) { cerr << "\e[1;33m[ " << s << " ] = [ "; using namespace experimental; copy(L, R, make_ostream_joiner(cerr, ", ")); cerr << " ]\e[0m\n"; } void sepline_(int length = 50) { cerr << "\e[1;35m"; cerr << string(length, '='); cerr << "\e[0m\n"; } #else #define safe ((void)0) #define sepline safe #define debug(...) safe #define orange(...) safe #endif void chmax(auto &x, auto val) { x = max(x, val); } void chmin(auto &x, auto val) { x = min(x, val); } auto floor_div(auto a, auto b) { return a / b - (a % b && (a < 0) ^ (b < 0)); } auto ceil_div(auto a, auto b) { return a / b + (a % b && (a < 0) ^ (b > 0)); } string bitstring(auto x, int width = -1) { string res; while (x) res.push_back((x & 1) + '0'), x >>= 1; if (res.empty()) res = "0"; if (width != -1) res.resize(width, '0'); ranges::reverse(res); return res; } vector count_array(const auto &container, int sz = -1) { if (sz == -1) sz = *ranges::max_element(container) + 1; vector res(sz); for (auto x : container) ++res[x]; return res; } #line 2 "A.cpp" #line 2 "/Users/baluteshih/coding/cplibrary/Numeric/Modint.hpp" // Reference: Atcoder Library https://github.com/atcoder/ac-library #line 2 "/Users/baluteshih/coding/cplibrary/Numeric/internal_math.hpp" // Reference: Atcoder Library https://github.com/atcoder/ac-library #ifdef _MSC_VER #include #endif namespace internal { constexpr long long safe_mod(long long x, long long m) { x %= m; if (x < 0) x += m; return x; } constexpr long long pow_mod_constexpr(long long x, long long n, int m) { if (m == 1) return 0; unsigned int _m = (unsigned int)(m); unsigned long long r = 1; unsigned long long y = safe_mod(x, m); while (n) { if (n & 1) r = (r * y) % _m; y = (y * y) % _m; n >>= 1; } return r; } constexpr bool is_prime_constexpr(int n) { if (n <= 1) return false; if (n == 2 || n == 7 || n == 61) return true; if (n % 2 == 0) return false; long long d = n - 1; while (d % 2 == 0) d /= 2; constexpr long long bases[3] = {2, 7, 61}; for (long long a : bases) { long long t = d; long long y = pow_mod_constexpr(a, t, n); while (t != n - 1 && y != 1 && y != n - 1) y = y * y % n, t <<= 1; if (y != n - 1 && t % 2 == 0) return false; } return true; } template constexpr bool is_prime = is_prime_constexpr(n); constexpr std::pair inv_gcd(long long a, long long b) { a = safe_mod(a, b); if (a == 0) return {b, 0}; long long s = b, t = a, m0 = 0, m1 = 1; while (t) { long long u = s / t; s -= t * u, m0 -= m1 * u; auto tmp = s; s = t, t = tmp, tmp = m0, m0 = m1, m1 = tmp; } if (m0 < 0) m0 += b / s; return {s, m0}; } } // namespace internal namespace internal { #ifndef _MSC_VER template using is_signed_int128 = typename std::conditional::value || std::is_same::value, std::true_type, std::false_type>::type; template using is_unsigned_int128 = typename std::conditional::value || std::is_same::value, std::true_type, std::false_type>::type; template using make_unsigned_int128 = typename std::conditional::value, __uint128_t, unsigned __int128>; template using is_integral = typename std::conditional::value || is_signed_int128::value || is_unsigned_int128::value, std::true_type, std::false_type>::type; template using is_signed_int = typename std::conditional<(is_integral::value && std::is_signed::value) || is_signed_int128::value, std::true_type, std::false_type>::type; template using is_unsigned_int = typename std::conditional<(is_integral::value && std::is_unsigned::value) || is_unsigned_int128::value, std::true_type, std::false_type>::type; template using to_unsigned = typename std::conditional< is_signed_int128::value, make_unsigned_int128, typename std::conditional::value, std::make_unsigned, std::common_type>::type>::type; #else template using is_integral = typename std::is_integral; template using is_signed_int = typename std::conditional::value && std::is_signed::value, std::true_type, std::false_type>::type; template using is_unsigned_int = typename std::conditional::value && std::is_unsigned::value, std::true_type, std::false_type>::type; template using to_unsigned = typename std::conditional::value, std::make_unsigned, std::common_type>::type; #endif template using is_signed_int_t = std::enable_if_t::value>; template using is_unsigned_int_t = std::enable_if_t::value>; template using to_unsigned_t = typename to_unsigned::type; struct modint_base {}; struct static_modint_base : modint_base {}; template using is_modint = std::is_base_of; template using is_modint_t = std::enable_if_t::value>; } // namespace internal #line 5 "/Users/baluteshih/coding/cplibrary/Numeric/Modint.hpp" template * = nullptr> struct static_modint : internal::static_modint_base { using mint = static_modint; public: static constexpr int mod() { return m; } static mint raw(int v) { mint x; x._v = v; return x; } static_modint() : _v(0) {} template * = nullptr> static_modint(T v) { long long x = (long long)(v % (long long)(umod())); if (x < 0) x += umod(); _v = (unsigned int)(x); } template * = nullptr> static_modint(T v) { _v = (unsigned int)(v % umod()); } unsigned int val() const { return _v; } mint& operator++() { _v++; if (_v == umod()) _v = 0; return *this; } mint& operator--() { if (_v == 0) _v = umod(); _v--; return *this; } mint operator++(int) { mint result = *this; ++*this; return result; } mint operator--(int) { mint result = *this; --*this; return result; } mint& operator+=(const mint& rhs) { _v += rhs._v; if (_v >= umod()) _v -= umod(); return *this; } mint& operator-=(const mint& rhs) { _v -= rhs._v; if (_v >= umod()) _v += umod(); return *this; } mint& operator*=(const mint& rhs) { unsigned long long z = _v; z *= rhs._v; _v = (unsigned int)(z % umod()); return *this; } mint& operator/=(const mint& rhs) { return *this = *this * rhs.inv(); } mint operator+() const { return *this; } mint operator-() const { return mint() - *this; } mint pow(long long n) const { assert(0 <= n); mint x = *this, r = 1; while (n) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; } mint inv() const { if (prime) { assert(_v); return pow(umod() - 2); } else { auto eg = internal::inv_gcd(_v, m); assert(eg.first == 1); return eg.second; } } friend mint operator+(const mint& lhs, const mint& rhs) { return mint(lhs) += rhs; } friend mint operator-(const mint& lhs, const mint& rhs) { return mint(lhs) -= rhs; } friend mint operator*(const mint& lhs, const mint& rhs) { return mint(lhs) *= rhs; } friend mint operator/(const mint& lhs, const mint& rhs) { return mint(lhs) /= rhs; } friend bool operator==(const mint& lhs, const mint& rhs) { return lhs._v == rhs._v; } friend bool operator!=(const mint& lhs, const mint& rhs) { return lhs._v != rhs._v; } friend std::strong_ordering operator<=>(const mint& lhs, const mint& rhs) { return lhs._v <=> rhs._v; } friend std::ostream& operator<<(std::ostream& os, const mint& v) { os << v._v; return os; } friend std::istream& operator>>(std::istream& is, mint& v) { long long x; is >> x; x %= (long long)(umod()); if (x < 0) x += umod(); v._v = (unsigned int)(x); return is; } private: unsigned int _v; static constexpr unsigned int umod() { return m; } static constexpr bool prime = internal::is_prime; }; using modint998244353 = static_modint<998244353>; using modint1000000007 = static_modint<1000000007>; #line 2 "/Users/baluteshih/coding/cplibrary/Numeric/Combination.hpp" #line 4 "/Users/baluteshih/coding/cplibrary/Numeric/Combination.hpp" template requires std::derived_from class Combination { inline static int N = 1; public: inline static std::vector fac = {T(1)}; inline static std::vector ifac = {T(1)}; Combination(int n) { ensure_upper_bound(n); } Combination(int n, T v) { N = 1; std::vector(n, v.raw(1)).swap(fac); std::vector(n, v.raw(1)).swap(ifac); ensure_upper_bound(n); } T C(int n, int m) { if (n < m || m < 0) return 0; return fac[n] * ifac[m] * ifac[n - m]; } T invC(int n, int m) { assert(n >= m && m >= 0); return ifac[n] * fac[m] * fac[n - m]; } T P(int n, int m) { if (n < m) return 0; return fac[n] * ifac[n - m]; } T H(int n, int m) { return C(n + m - 1, m); } // a - b <= k and all non-empty proper prefix have a - b < k T extend_catalan(int a, int b, int k) { if (a - b == k) return C(a + b - 1, a - 1) - C(a + b - 1, b + k); return C(a + b, a) - C(a + b, b + k); } void ensure_upper_bound(int n) { if (N >= n) return; fac.resize(n), ifac.resize(n); for (int i = N; i < n; ++i) fac[i] = fac[i - 1] * i; ifac.back() = fac.back().inv(); for (int i = n - 2; i >= N; --i) ifac[i] = ifac[i + 1] * (i + 1); N = n; } }; namespace CombFunc { template std::vector power(T base, int n) { std::vector res(n + 1, 1); for (int i = 1; i <= n; ++i) res[i] = res[i - 1] * base; return res; } template std::vector ipower(T base, int n) { return power(base.inv(), n); } template std::vector linear_inverse(int n) { std::vector res(n + 1, 1); int MOD = T().mod(); for (int i = 2; i <= n; ++i) { res[i] = res[MOD % i] * (MOD - MOD / i); } return res; } } #line 5 "A.cpp" using mint = modint998244353; int main() { ios::sync_with_stdio(0), cin.tie(0); int n; cin >> n; auto pw = CombFunc::power(26, n + 1); Combination comb(n + 1); cout << comb.C(n, 4) * pw[n - 4] << "\n"; }