M=1000000007;n,k,i,t;pow(long a,int m){return m?pow(a*a%M,m/2)*(m%2?a:1)%M:1;}main(long s){for(s=scanf("%d",&n);~scanf("%d",&t);k+=!!t)n-=t;for(;k/++i;)s=s*(n-i+2)%M*pow(i,M-2)%M;s=!printf(s?"%ld":"NA",s);}