#include using namespace std; #include using mint = atcoder::modint998244353; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; int pos = 0, neg = 0, zero = 0; for (int i = 0, x; i < N; i++) { cin >> x; (x > 0 ? pos : x < 0 ? neg : zero)++; } mint ans = mint(2).pow(N - 1); if (zero) ans *= mint(1 + (pos > 0) + (neg > 0)) / 2; cout << ans.val() << endl; }