#include #include using namespace std; using namespace atcoder; using mint = modint998244353; int main(){ // input + prep int N; cin >> N; int neg = 0, pos = 0, zero = 0; for(int i = 0; i < N; i++){ int x; cin >> x; if(x < 0) neg++; if(x > 0) pos++; if(x == 0) zero++; } // solve mint ans = 1; for(int i = 0; i < neg - 1; i++) ans *= 2; for(int i = 0; i < pos - 1; i++) ans *= 2; if(neg > 0 && pos > 0) ans *= 2; if(zero) ans *= int(neg > 0) + int(pos > 0) + 1; // output cout << ans.val() << endl; }