#include <bits/stdc++.h> using namespace std; #ifdef _RUTHEN #include <debug.hpp> #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template <class T> using V = vector<T>; #include <atcoder/modint> using mint = atcoder::modint998244353; int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; mint ans = mint(3).pow(N); cout << ans.val() << '\n'; return 0; }