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