mint M,x;ll H,N;{rd(M);for(x=1;cin>>H;N+=H>0)M-=H;x/=(1..N)/(M+2-N..);if(x)wt(x);else wt("NA");}