#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ll long long #define INF 9e18; #define mod 998244353 ll Power(ll a,ll b,ll m){ ll Answer=1; for(int i=1;i<=b;i++) Answer=(Answer*a)%m; return Answer; } int main(){ cin.tie(0)->sync_with_stdio(0); cout.tie(0); ll N; cin>>N; vectorc(N); rep(i,N) cin>>c.at(i); ll ans=0; ll my_cnt=0,pl_cnt=0; bool zero=false; rep(i,N){ if(c.at(i)>0) pl_cnt++; else if(c.at(i)<0) my_cnt++; else zero=true; } if(pl_cnt==0 && my_cnt!=0){ ans=Power(2,my_cnt-1,mod); if(zero==true) ans*=2; } else if(my_cnt==0 && pl_cnt!=0){ ans=Power(2,pl_cnt-1,mod); if(zero==true) ans*=2; } else if(my_cnt!=0 && pl_cnt!=0){ ans=Power(2,my_cnt-1,mod)*Power(2,pl_cnt-1,mod); ans%=mod; ans*=2; if(zero==true) ans*=3; } else{ cout<<1<