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: Wrong Answer)

#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define ii pair<int,int>
#define F first
#define S second
#define pb push_back
#define pf push_front
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fore(i,a,b) for(int i = a;i < b; i+= 1)
#define forr(i,a) for(int i = a; i >= 0; i--)
#define fori(i,m) for(auto i = m.begin(); i != m.end(); i++) 
#define sz(s) int(s.size())
#define cls(a,car) memset(a,car,sizeof (a))
using namespace std;
typedef long long ll;
const int N = 2 * 1e5 + 5;
const ll mod = 1e9 + 7;
const int INF = INT_MAX;
const ll INFCAD  = ll(INT_MAX) * 2 + 1;
//freopen("","r",stdin);
//freopen("","w",stdout);
ll POW(ll a,ll b,ll mod){
    ll ans = 1;
    while(b){
        if(b & 1)
            ans = (ans % mod * a % mod) % mod;
        b >>= 1;
        a = (a % mod * a % mod) % mod;
    }
    return ans;
}
ll euler(ll n){
    ll res = n;
    for(ll i = 2; i * i <= n; i++){
        if(n % i == 0){//cuando encuentra un primo
            res -= res / i;
            while(n % i == 0)
                n /= i;
        }
    }
    if(n!=1)
        res-=res/n;
    return res;
}
ll combi(ll n,ll k){
  k=min(k,n-k);
  ll ans=1;
  ll ans2 = 1;
  //usa prop matematica c(n,r)=(n*(n-1)*..*1)/(r!*(n-r)!)
  //se cancelan el (n-r)! con el del numerador
  for(ll i=0;i<k;i++){

    //ans = (ans % mod * (n - i + mod) % mod) % mod;
    ans = (ans % mod * (n - i + mod) % mod) % mod;
    //cout<<ans<<" mult ans \n";
    ans2 = (ans2 % mod * (i + 1) % mod) % mod;
    //ans = (ans % mod * POW(i + 1,euler(i + 1) - 1, mod)) % mod;    //cout<<ans<<" div ans \n";
  }
  return (ans * POW(ans2,1000000005,mod)) % mod;
}
int main(){
    ll n,a,b;
    cin >> n >> a >> b;
    cout << (POW(2,n,mod) - 1 - combi(n,a) - combi(n,b) + mod) % mod;
    return 0;
}