import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		}
		
		
	}
	
	
	//拡張ユークリッドでの逆元の求め方でnCkをつくる、前処理必須。
	
	static  int MAX = 510000;
	static  int MOD = 1000000007;

	 static long[] fac = new long[MAX]; 
	 static long[] finv = new long[MAX]; 
	 static long[] inv = new long[MAX]; 

	// テーブルを作る前処理
	static void COMinit() {
	    fac[0] = fac[1] = 1;
	    finv[0] = finv[1] = 1;
	    inv[1] = 1;
	    for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    }
	}

	// 二項係数計算
	static long COM(int n, int k){
	    if (n < k) return 0;
	    if (n < 0 || k < 0) return 0;
	    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	}
		

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		}
		
		
	}
	
	
	//拡張ユークリッドでの逆元の求め方でnCkをつくる、前処理必須。
	
	static  int MAX = 510000;
	static  int MOD = 1000000007;

	 static long[] fac = new long[MAX]; 
	 static long[] finv = new long[MAX]; 
	 static long[] inv = new long[MAX]; 

	// テーブルを作る前処理
	static void COMinit() {
	    fac[0] = fac[1] = 1;
	    finv[0] = finv[1] = 1;
	    inv[1] = 1;
	    for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    }
	}

	// 二項係数計算
	static long COM(int n, int k){
	    if (n < k) return 0;
	    if (n < 0 || k < 0) return 0;
	    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	}
		

} Main static  int MAX = 510000; MAX 510000 static  int MOD = 1000000007; MOD 1000000007 static long[] fac = new long[MAX]; fac new long[MAX] MAX static long[] finv = new long[MAX]; finv new long[MAX] MAX static long[] inv = new long[MAX]; inv new long[MAX] MAX public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		}
		
		
	} main {
		try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		}
		
		
	} try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		} {
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		} Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) long mod = (long)1e9+7; mod (long)1e9+7 (long)1e9 7 int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int M = scan.nextInt(); M scan.nextInt() scan.nextInt scan int[]a = new int[M]; a new int[M] M int[]s = new int [N]; s new int [N] N for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			} int i = 0; int i = 0; i 0 i<M i M i++ i++ i {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			} {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			} a[i] = scan.nextInt() a[i] a i scan.nextInt() scan.nextInt scan s[a[i]-1]++ s[a[i]-1] s a[i]-1 a[i] a i 1 ArrayList<Integer>sb = new ArrayList<Integer>(); sb new ArrayList<Integer>() for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			} int i = 0; int i = 0; i 0 i<N-1 i N-1 N 1 i++ i++ i {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			} {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			} if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				} s[i]==1&&s[i+1]==1 s[i]==1 s[i] s i 1 s[i+1]==1 s[i+1] s i+1 i 1 1 {
					System.out.println(0);
					System.exit(0);
				} System.out.println(0) System.out.println System.out System System.out 0 System.exit(0) System.exit System 0 int count = 1; count 1 for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			} int i = 0; int i = 0; i 0 i<N i N i++ i++ i {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			} {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			} if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				} s[i]==1&&count!=0 s[i]==1 s[i] s i 1 count!=0 count 0 {
					sb.add(count-1);
					count=0;
				} sb.add(count-1) sb.add sb count-1 count 1 count=0 count 0 if(s[i]==0) {
					count++;
				} s[i]==0 s[i] s i 0 {
					count++;
				} count++ count if(i==N-1) {
					sb.add(count-1);
				} i==N-1 i N-1 N 1 {
					sb.add(count-1);
				} sb.add(count-1) sb.add sb count-1 count 1 COMinit() COMinit long goukei = 1; goukei 1 for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			} Integer i sb {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			} {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			} if(i==0)continue; i==0 i 0 continue; int k = i/2; k i/2 i 2 long sum = 0; sum 0 for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				} int j = 0; int j = 0; j 0 j<=k j k j++ j++ j {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				} {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				} sum = (sum+COM(i-j,j))%mod sum (sum+COM(i-j,j))%mod (sum+COM(i-j,j)) sum COM(i-j,j) COM i-j i j j mod goukei = (goukei*sum)%mod goukei (goukei*sum)%mod (goukei*sum) goukei sum mod System.out.println(goukei) System.out.println System.out System System.out goukei String[]args args // テーブルを作る前処理
	static void COMinit() {
	    fac[0] = fac[1] = 1;
	    finv[0] = finv[1] = 1;
	    inv[1] = 1;
	    for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    }
	} COMinit {
	    fac[0] = fac[1] = 1;
	    finv[0] = finv[1] = 1;
	    inv[1] = 1;
	    for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    }
	} fac[0] = fac[1] = 1 fac[0] fac 0 fac[1] = 1 fac[1] fac 1 1 finv[0] = finv[1] = 1 finv[0] finv 0 finv[1] = 1 finv[1] finv 1 1 inv[1] = 1 inv[1] inv 1 1 for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    } int i = 2; int i = 2; i 2 i < MAX i MAX i++ i++ i {
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    } {
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    } fac[i] = fac[i - 1] * i % MOD fac[i] fac i fac[i - 1] * i % MOD fac[i - 1] * i fac[i - 1] fac i - 1 i 1 i MOD inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD inv[i] inv i MOD - inv[MOD%i] * (MOD / i) % MOD MOD inv[MOD%i] * (MOD / i) % MOD inv[MOD%i] * (MOD / i) inv[MOD%i] inv MOD%i MOD i (MOD / i) MOD i MOD finv[i] = finv[i - 1] * inv[i] % MOD finv[i] finv i finv[i - 1] * inv[i] % MOD finv[i - 1] * inv[i] finv[i - 1] finv i - 1 i 1 inv[i] inv i MOD // 二項係数計算
	static long COM(int n, int k){
	    if (n < k) return 0;
	    if (n < 0 || k < 0) return 0;
	    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	} COM {
	    if (n < k) return 0;
	    if (n < 0 || k < 0) return 0;
	    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	} if (n < k) return 0; n < k n k return 0; 0 if (n < 0 || k < 0) return 0; n < 0 || k < 0 n < 0 n 0 k < 0 k 0 return 0; 0 return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; fac[n] * (finv[k] * finv[n - k] % MOD) % MOD fac[n] * (finv[k] * finv[n - k] % MOD) fac[n] fac n (finv[k] * finv[n - k] % MOD) finv[k] * finv[n - k] finv[k] finv k finv[n - k] finv n - k n k MOD MOD int n n int k k public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		}
		
		
	}
	
	
	//拡張ユークリッドでの逆元の求め方でnCkをつくる、前処理必須。
	
	static  int MAX = 510000;
	static  int MOD = 1000000007;

	 static long[] fac = new long[MAX]; 
	 static long[] finv = new long[MAX]; 
	 static long[] inv = new long[MAX]; 

	// テーブルを作る前処理
	static void COMinit() {
	    fac[0] = fac[1] = 1;
	    finv[0] = finv[1] = 1;
	    inv[1] = 1;
	    for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    }
	}

	// 二項係数計算
	static long COM(int n, int k){
	    if (n < k) return 0;
	    if (n < 0 || k < 0) return 0;
	    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	}
		

} public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		}
		
		
	}
	
	
	//拡張ユークリッドでの逆元の求め方でnCkをつくる、前処理必須。
	
	static  int MAX = 510000;
	static  int MOD = 1000000007;

	 static long[] fac = new long[MAX]; 
	 static long[] finv = new long[MAX]; 
	 static long[] inv = new long[MAX]; 

	// テーブルを作る前処理
	static void COMinit() {
	    fac[0] = fac[1] = 1;
	    finv[0] = finv[1] = 1;
	    inv[1] = 1;
	    for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    }
	}

	// 二項係数計算
	static long COM(int n, int k){
	    if (n < k) return 0;
	    if (n < 0 || k < 0) return 0;
	    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	}
		

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String[]args) {
		try(Scanner scan = new Scanner(System.in)){
			long mod = (long)1e9+7;
			int N = scan.nextInt();
			int M = scan.nextInt();
			int[]a = new int[M];
			int[]s = new int [N];
			for(int i = 0;i<M;i++) {
				a[i] = scan.nextInt();
				s[a[i]-1]++;
			}
			ArrayList<Integer>sb = new ArrayList<Integer>();
			
			for(int i = 0;i<N-1;i++) {
				if(s[i]==1&&s[i+1]==1) {
					System.out.println(0);
					System.exit(0);
				}
			}
			
			int count = 1;
			for(int i = 0;i<N;i++) {
				if(s[i]==1&&count!=0) {
					sb.add(count-1);
					count=0;
				}else if(s[i]==0) {
					count++;
				}
				if(i==N-1) {
					sb.add(count-1);
				}
			}
			COMinit();
			long goukei = 1;
			
			for(Integer i:sb) {
				//System.out.println(i);
				if(i==0)continue;
				int k = i/2;
				long sum = 0;
				for(int j = 0;j<=k;j++) {
					sum = (sum+COM(i-j,j))%mod;
					//System.out.println(COM(i-j,j));
				}
				
				goukei = (goukei*sum)%mod;
			}
			//System.out.println();
			System.out.println(goukei);
			
			
			
			
		}
		
		
	}
	
	
	//拡張ユークリッドでの逆元の求め方でnCkをつくる、前処理必須。
	
	static  int MAX = 510000;
	static  int MOD = 1000000007;

	 static long[] fac = new long[MAX]; 
	 static long[] finv = new long[MAX]; 
	 static long[] inv = new long[MAX]; 

	// テーブルを作る前処理
	static void COMinit() {
	    fac[0] = fac[1] = 1;
	    finv[0] = finv[1] = 1;
	    inv[1] = 1;
	    for (int i = 2; i < MAX; i++){
	        fac[i] = fac[i - 1] * i % MOD;
	        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
	        finv[i] = finv[i - 1] * inv[i] % MOD;
	    }
	}

	// 二項係数計算
	static long COM(int n, int k){
	    if (n < k) return 0;
	    if (n < 0 || k < 0) return 0;
	    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
	}
		

}
