Problem:
Score : 400 points

Problem Statement

Akari has n kinds of flowers, one of each kind.

She is going to choose one or more of these flowers to make a bouquet.

However, she hates two numbers a and b, so the number of flowers in the bouquet cannot be a or b.

How many different bouquets are there that Akari can make?

Find the count modulo (10^9 + 7).

Here, two bouquets are considered different when there is a flower that is used in one of the bouquets but not in the other bouquet.

Constraints

All values in input are integers.

2 \leq n \leq 10^9

1 \leq a < b \leq \textrm{min}(n, 2 \times 10^5)

Input

Input is given from Standard Input in the following format:

n a b

Output

Print the number of bouquets that Akari can make, modulo (10^9 + 7). (If there are no such bouquets, print 0.)

Sample Input 1

4 1 3

Sample Output 1

7

In this case, Akari can choose 2 or 4 flowers to make the bouquet.

There are 6 ways to choose 2 out of the 4 flowers, and 1 way to choose 4, so there are a total of 7 different bouquets that Akari can make.

Sample Input 2

1000000000 141421 173205

Sample Output 2

34076506

Print the count modulo (10^9 + 7).

Solution in C++14 (GCC 5.4.1) (judge verdict: Accepted)

#include <bits/stdc++.h>
 
using namespace std;
 
// typedef
typedef long long ll;
typedef long double ldbl;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<string> vs;
 
// container util
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for (typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
 
// repetition
#define FOR(i,m,n) for (ll (i) = ((ll) m); (i) < ((ll) n); ++(i))
#define RFOR(i,m,n) for (ll (i) = ((ll) (m)-1); (i) >= ((ll) n); --(i))
#define REP(i,n) FOR(i,0,n)
 
// i/o
#define TFOUT(b,t,f) cout << ((b)? (t) : (f)) << endl
 
// constant
const double PI  = acos(-1.0);
const ll    MOD = (ll)(1e9 + 7);
// DO NOT set INFTY_XXXs constants. They may bring some BUG! Use MAX_XXXs in climit instead.
 
// clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))
 
// debug
#define dump(x)  cerr << #x << " = " << (x) << endl
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl


template<typename T>
inline vector<T> cin_vector(const size_t n) {
     vector<T> vec;
    vec.reserve(n);
    REP(i, n) {
        T element; cin >> element;
        vec.push_back(element);
    }
    return vec;
}

template<typename T>
inline vector< vector<T> > cin_matrix(const size_t m, const size_t n) {
    vector< vector<T> > matrix;
    matrix.reserve(m);
    REP(i, m) {
        vector<T> vec = cin_vector<T>(n);
        matrix.push_back(vec);
    }
    return matrix;
}

template<typename T>
inline void cout_vector(const vector<T>& vec) {
    REP(i, SZ(vec)-1) {
       cout << vec[i] << ' ';
    }
    cout << vec[SZ(vec)-1] << endl;
}

template<typename T>
inline void cout_matrix(vector< vector<T> > matrix) {
    for(const vector<T>& vec : matrix) {
         cout_vector<T>(vec);
    }
}

ll mod_pow(ll b, ll e) {
    ll ret = 1;
    while (e != 0) {
        if (e % 2 == 1) ret = (ret * b) % MOD;
        b = (b * b) % MOD;
        e /= 2;
    }
    return ret;
}

vector<ll> mod_invtable(ll max) {
    vector<ll> ret({1});
    ll fact = 1;
    FOR(n, 1, max + 1) {
        fact = (fact * n) % MOD;
        ll inv = mod_pow(fact, MOD - 2);
        ret.push_back(inv);
    }
    return ret;
}

ll mod_combi(ll n, ll r, const vector<ll>& invtable) {
    ll ret = 1;
    FOR(i, n-r+1, n+1) {
        ret = (ret*i) % MOD;
    }
    ret = (ret * invtable[r]) % MOD;

    return ret;
}

int main() {
    ll n; cin >> n;
    ll a, b; cin >> a >> b;

    vector<ll> invtable = mod_invtable(max({a, b}));
    cout << (
        (
            mod_pow(2LL, n) - 1LL +
            (MOD - mod_combi(n, a, invtable))
            + (MOD - mod_combi(n, b, invtable))
        ) % MOD
       ) << endl;
    return 0;
}