#include using namespace std; typedef long long ll; const int MOD = 998244353; ll dp[200010][2][3][3]; int main() { int N; cin >> N; vectorA(N); for(int i=0;i> A[i]; dp[0][0][0][0]=1; for(int i=0;i