Problem: Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single box are of the same color (hence they are indistinguishable). Also, no two boxes have flowers of the same color.

Now Devu wants to select exactly s flowers from the boxes to decorate his garden. Devu would like to know, in how many different ways can he select the flowers from each box? Since this number may be very large, he asks you to find the number modulo (109 + 7). 

Devu considers two ways different if there is at least one box from which different number of flowers are selected in these two ways.

Input

The first line of input contains two space-separated integers n and s (1 ≤ n ≤ 20, 0 ≤ s ≤ 1014).

The second line contains n space-separated integers f1, f2, ... fn (0 ≤ fi ≤ 1012).

Output

Output a single integer — the number of ways in which Devu can select the flowers modulo (109 + 7).

Examples

Input

2 3
1 3


Output

2


Input

2 4
2 2


Output

1


Input

3 5
1 3 2


Output

3

Note

Sample 1. There are two ways of selecting 3 flowers: {1, 2} and {0, 3}.

Sample 2. There is only one way of selecting 4 flowers: {2, 2}.

Sample 3. There are three ways of selecting 5 flowers: {1, 2, 2}, {0, 3, 2}, and {1, 3, 1}.

Solution (in JAVA):

Solution:
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.*;

public class DevuAndFlowers {

	static long mod = 1000000007;
	static long modInv[];
	static int N;
	static long S;
	static long f[];
	static long fact[];
	public static void main(String[] args) {
		JS in = new JS();
		N = in.nextInt();
		S = in.nextLong();
		f = new long[N];
		fact = new long[1000000];
		fact[0]=1;
		fact[1]=1;
		for(int i = 2; i < 1000000; i++) fact[i] = (fact[i-1]*i)%mod;
		for(int i = 0; i < N; i++) f[i] = in.nextLong();
		modInv = new long[N+1];
		for(int i = 0; i <= N; i++) modInv[i] = pow(i, mod-2);
		
		long ans = 0;
		for(int i = 0; i < (1<<N); i++) {
			long over = S;
			for(int j = 0; j < N; j++) {
				if((i & (1<<j)) > 0) {
					over -= f[j]+1;	
				}
			}
			if(over < 0) continue;
			long v = sumTo(over, N);
			long vs = c(over+N-1, N-1, mod);
			if(Integer.bitCount(i)%2==1) ans -= vs;
			else ans += vs;
			while(ans < 0) ans+=mod;
			while(ans >= mod)ans-=mod;
		}
		System.out.println(ans);
	}

	static long sumTo(long sum, long n) {
		return choose(sum+n-1, n-1);
	}
	static long choose(long n, long k) {
		long prev = 1;
		for(int c = 1; c <= k; c++)
			prev = (((prev*(n-c+1))%mod)*modInv[c])%mod;
		return prev;
	}
	static long c(long n, long k, long p) {
		if(cf(n,p) > cf(k,p) + cf(n-k,p)) return 0;
		long ans = 1;
		for(long i = n-k+1; i <= n; i++) {
			ans = ((ans%mod)*(i%mod))%mod;
		}
		ans = ((ans%mod)*inverse(fact[(int)k],mod))%mod;
		return ans;
	}
	static long inverse(long n, long p) {
		return pow(n, p-2);
	}
	static long cf(long n, long p) {
		long k = 0;
		while(n >= p) {
			k+=n/p;
			n/=p;
		}
		return k;
	}
	
	
	static long pow(long base, long power) {
		if(power == 0) return 1;
		if(power == 1) return base;
		if((power%2)==0) {
			long r = pow(base, power/2);
			return (r*r)%mod;
		}
		else {
			return (base * pow(base,power-1))%mod;
		}
	}

	
	static class JS{
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;
		
		public JS() {
			in = new BufferedInputStream(System.in, BS);
		}
		
		public JS(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}
		
		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}				
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}
		
		public int nextInt() {
			return (int)nextLong();
		}
		
		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}
		
		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}
		
		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}
		
		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int []nia(int n){
			int r[] = new int[n];
			for(int i = 0; i < n; i++) r[i] = nextInt();
			return r;
		}
		public double []nda(int n){
			double r[] = new double[n];
			for(int i = 0; i < n; i++) r[i] = nextDouble();
			return r;
		}
		public long []nla(int n){
			long r[] = new long[n];
			for(int i = 0; i < n; i++) r[i] = nextLong();
			return r;
		}
	}
	
}