#include using namespace std; #define pb emplace_back #define mp make_pair using ll = long long; using pii = pair; constexpr int mod = 998244353; constexpr int inf = 0x3f3f3f3f; constexpr int N = 2e5 + 10; ll pow_mod(ll x, ll p){ ll s = 1; while(p){ if(p & 1) s = s * x % mod; x = x * x % mod; p >>= 1; } return s; } void add(int &x, int y){ x += y; if(x >= mod) x -= mod; } ll P[10]; int n, dp[N][5], cnt[5]; void _main(){ int n; for(int i=2; i<=5; ++i) P[i] = pow_mod(i, mod - 2); for(int i=0; i<5; ++i){ dp[1][i] = P[5]; } for(int i=0; i<5; ++i){ cnt[i] = 0; for(int j=0; j<5; ++j){ if(abs(i - j) <= 1){ ++cnt[i]; } } } cin >> n; int ans = 1ll * 3 * P[5] % mod; for(int i=1; i 0 && j < 4){ add(ans, tmp); } } } } } cout << ans << '\n'; } int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); _main(); return 0; }