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.util.Map;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.BufferedWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Mahmoud Aladdin <aladdin3>
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {

    public static final Long MOD = (long)(1e9 + 7);

    public void solve(int testNumber, InputReader jin, OutputWriter jout) {
        int n = jin.int32();
        long s = jin.int64();

        long[] f = new long[n];
        long[] inv = new long[1 + (n << 1)];

        Polynomial p = new Polynomial();
        p.add(0, 1);

        for(int i = 0; i < n; i++) {
            f[i] = jin.int64();
            inv[2 * i + 1] = modpow(2 * i + 1, MOD - 2, MOD);
            inv[2 * i + 2] = modpow(2 * i + 2, MOD - 2, MOD);
            Polynomial temp = new Polynomial();
            temp.add(0, 1);
            temp.add(f[i] + 1, -1);
            p = Polynomial.multiply(p, temp);
        }

        long ans = 0;
        Iterator<Long> it = p.iterPowers();
        while(it.hasNext()) {
            long power = it.next();
            long coeff = (p.getTerm(power) + MOD) % MOD;
            long rem = s - power;
            if(rem >= 0) {
                long temp = comb(n + rem - 1, rem, inv) * coeff;
                ans = (ans % MOD + temp % MOD) % MOD;
            }
        }
        jout.println(ans);
    }

    private long comb(long n, long r, long[] inv) {
        if(r > n) return 0;
        if(n - r < r) r = n - r;
        n %= MOD;
        long ans = 1;
        for(int i = 0; i < r; i++) {
            ans = (ans * (n - i)) % MOD;
            ans = (ans * inv[i + 1]) % MOD;
        }
        return ans;
    }

    private long modpow(long a, long b, long mod) {
        long res = 1;
        while (b > 0) {
            if (b % 2 == 1) {
                res = (res * a) % mod;
            }
            a = (a * a) % mod;
            b >>= 1;
        }
        return res;
    }
}

class Polynomial {
    Map<Long, Long> terms;
    public static long MOD = Long.MAX_VALUE;

    public Polynomial() {
        terms = new HashMap<Long, Long>();
    }

    public Iterator<Long> iterPowers() {
        return terms.keySet().iterator();
    }

    public Long getTerm(Long power) {
        if(terms.containsKey(power))
            return terms.get(power);
        return 0L;
    }

    public void add(long power, long value) {
        long oldVal = terms.containsKey(power)? terms.get(power) : 0;
        terms.put(power, oldVal + value);
    }

    public static Polynomial multiply(Polynomial p1, Polynomial p2) {
        Polynomial result = new Polynomial();
        for(Long pow1: p1.terms.keySet()) {
            long val1 = p1.terms.get(pow1);
            for(Long pow2: p2.terms.keySet()) {
                long val2 = p2.terms.get(pow2);
                result.add(pow1 + pow2, (val1 * val2) % MOD);
            }
        }
        return result;
    }
}

class InputReader {
    private static final int bufferMaxLength = 1024;
    private InputStream in;
    private byte[] buffer;
    private int currentBufferSize;
    private int currentBufferTop;
    private static final String tokenizers = " \t\r\f\n";
    
    public InputReader(InputStream stream) {
        this.in = stream;
        buffer = new byte[bufferMaxLength];
        currentBufferSize = 0;
        currentBufferTop = 0;
    }
    
    private boolean refill() {
        try {
            this.currentBufferSize = this.in.read(this.buffer);
            this.currentBufferTop = 0;
        } catch(Exception e) {}
        return this.currentBufferSize > 0;
    }
    
    
    private Byte readChar() {
        if(currentBufferTop < currentBufferSize) {
            return this.buffer[this.currentBufferTop++];
        } else {
            if(!this.refill()) {
                return null;
            } else {
                return readChar();
            }
        }
    }

    public String token()  {
        StringBuffer tok = new StringBuffer();
        Byte first;
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) != -1));
        if(first == null) return null;
        tok.append((char)first.byteValue());
        while((first = readChar()) != null && (tokenizers.indexOf((char) first.byteValue()) == -1)) {
            tok.append((char)first.byteValue());
        }
        return tok.toString();
    }
    
    public Integer int32() throws NumberFormatException {
        String tok = token();
        return tok == null? null : Integer.parseInt(tok);
    }

    public Long int64() throws NumberFormatException {
        String tok = token();
        return tok == null? null : Long.parseLong(tok);
    }

    }

class OutputWriter {
    private final int bufferMaxOut = 1024;
    private PrintWriter out;
    private StringBuilder output;
    private boolean forceFlush = false;

    public OutputWriter(OutputStream outStream) {
        out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outStream)));
        output = new StringBuilder(2 * bufferMaxOut);
    }

    public OutputWriter(Writer writer) {
        forceFlush = true;
        out = new PrintWriter(writer);
        output = new StringBuilder(2 * bufferMaxOut);
    }

    private void autoFlush() {
        if(forceFlush || output.length() >= bufferMaxOut) {
            flush();
        }
    }

    public void print(Object... tokens) {
        for(int i = 0; i < tokens.length; i++) {
            if(i != 0) output.append(' ');
            output.append(tokens[i]);
        }
        autoFlush();
    }

    public void println(Object... tokens) {
        print(tokens);
        output.append('\n');
        autoFlush();
    }

    public void flush() {
        out.print(output);
        output.setLength(0);
    }

    public void close() {
        flush();
        out.close();
    }
}