#include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint998244353; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int N, c, ne=0, po=0, zero=0; cin >> N; for (int i=0; i> c; if (c < 0) ne++; else if (c > 0) po++; else zero++; } if (N == 1 && zero == 1){ cout << 1 << endl; return 0; } mint ans=1; if (ne) ans *= mint(2).pow(ne-1); if (po) ans *= mint(2).pow(po-1); if (ne && po) ans *= 2; if (zero){ if (ne && po) ans *= 3; else ans *= 2; } cout << ans.val() << endl; return 0; }