// 嘘解法チェック #include using namespace std; using ll = long long; #define CIN( LL , A ) LL A; cin >> A #define RETURN( ANSWER ) cout << ( ANSWER ) << "\n"; return 0 constexpr const ll P = 998244353; int main(){ CIN( ll , N ); N %= P - 1; ll answer = 1; while( N != 0 ){ answer = ( answer * 3 ) % P; N--; } RETURN( answer ); }