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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.util.HashMap;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

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

    static class DevuAndFlowers {
        long MOD = (long) (1e9) + 7;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            Poly p = new Poly();
            int N = in.nextInt();
            long s = in.nextLong();
            for (int i = 0; i < N; i++) {
                if (N == 1) {
                    long a = in.nextLong();
                    if (a >= s) {
                        out.println(1);
                    } else {
                        out.println(0);
                    }
                    return;
                }
                p.mult(in.nextLong() + 1);
            }
            long inv = 1;
            for (int i = 1; i <= N - 1; i++) {
                inv *= i;
                inv %= MOD;
            }
            inv = MathUtils.inverse(inv, MOD);
            long res = 0;
            for (long l : p.poly.keySet()) {
                long i = s - l;
                if (i < 0) {
                    continue;
                } else {
                    long num = 1;
                    for (long j = N + i - 1; j >= i + 1; j--) {
                        num *= j % MOD;
                        num %= MOD;
                    }
                    num *= inv;
                    num %= MOD;
                    num *= p.poly.get(l);
                    num %= MOD;
                    res += num;
                    if (res >= MOD) {
                        res -= MOD;
                    }
                    if (res < 0) {
                        res += MOD;
                    }
                }
            }
            out.println(res);
        }

        class Poly {
            HashMap<Long, Long> poly;

            Poly() {
                poly = new HashMap<>();
                poly.put(0L, 1L);
            }

            void mult(long i) {
                HashMap<Long, Long> toAdd = new HashMap<>();
                for (long l : poly.keySet()) {
                    toAdd.putIfAbsent(l + i, 0L);
                    toAdd.replace(l + i, -poly.get(l));
                }
                for (long l : toAdd.keySet()) {
                    poly.putIfAbsent(l, 0L);
                    long next = poly.get(l) + toAdd.get(l);
                    if (next < 0) {
                        next += MOD;
                    }
                    if (next >= MOD) {
                        next -= MOD;
                    }
                    poly.replace(l, next);
                }
            }

        }

    }

    static class MathUtils {
        public static long inverse(long a, long mod) {
            long[] inv = extended_gcd(a, mod);
            if (inv[0] != 1) {
                return 0;
            } else {
                return (inv[1] + 2 * mod) % mod;
            }
        }

        public static long[] extended_gcd(long a, long b) {
            //three numbers, first is gcd, second is x, third is y
            if (a == 0) {
                return new long[]{b, 0, 1};
            }
            long[] next = extended_gcd(b % a, a);
            long tempX = next[1];
            next[1] = next[2] - (b / a) * next[1];
            next[2] = tempX;
            return next;
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }
}