#include<bits/stdc++.h>
using namespace std;
int n,a,b;
void read(int &x)
{
	char ch;bool ok;
	for(ok=0;!isdigit(ch);ch=getchar()) if(ch=='-') ok=1;
	for(x=0;isdigit(ch);x=x*10+ch-'0',ch=getchar()); if(ok) x=-x;
}
int main()
{
	read(n),read(a),read(b);
	cout<<n-a+b;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

const int INF = 1e9;
const long long inf = 1LL<<60;
using ll = long long;
template<int MOD> struct ModInt {
    static const int Mod = MOD; unsigned x; ModInt() : x(0) { }
    ModInt(signed sig) { x = sig < 0 ? sig % MOD + MOD : sig % MOD; }
    ModInt(signed long long sig) { x = sig < 0 ? sig % MOD + MOD : sig % MOD; }
    int get() const { return (int)x; }
    ModInt &operator+=(ModInt that) { if ((x += that.x) >= MOD) x -= MOD; return *this; }
    ModInt &operator-=(ModInt that) { if ((x += MOD - that.x) >= MOD) x -= MOD; return *this; }
    ModInt &operator*=(ModInt that) { x = (unsigned long long)x * that.x % MOD; return *this; }
    ModInt &operator/=(ModInt that) { return *this *= that.inverse(); }
    ModInt operator+(ModInt that) const { return ModInt(*this) += that; }
    ModInt operator-(ModInt that) const { return ModInt(*this) -= that; }
    ModInt operator*(ModInt that) const { return ModInt(*this) *= that; }
    ModInt operator/(ModInt that) const { return ModInt(*this) /= that; }
    ModInt inverse() const { long long a = x, b = MOD, u = 1, v = 0;
        while (b) { long long t = a / b; a -= t * b; std::swap(a, b); u -= t * v; std::swap(u, v); }
        return ModInt(u); }
    bool operator==(ModInt that) const { return x == that.x; }
    bool operator!=(ModInt that) const { return x != that.x; }
    ModInt operator-() const { ModInt t; t.x = x == 0 ? 0 : Mod - x; return t; }
};
template<int MOD> ostream& operator<<(ostream& st, const ModInt<MOD> a) { st << a.get(); return st; };
template<int MOD> ModInt<MOD> operator^(ModInt<MOD> a, unsigned long long k) {
    ModInt<MOD> r = 1; while (k) { if (k & 1) r *= a; a *= a; k >>= 1; } return r; }
typedef ModInt<1000000007> mint;


int main(){
  ll n, m;
  cin >> n >> m;
  ll s = 0;
  vector<int> a(n);
  for (int i=0; i<n; i++) {
    cin >> a[i];
    s += a[i];
  }
  mint res = mint(1);
  for (ll r = 0; r < n+s; r++) {
    res *= mint(n+m-r);
    res /= mint(n+s-r);
  }
  cout << res << endl;
}
