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-----
4 1 3

-----Sample Output-----
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.

Difficulty: interview

Starter code:

Solutions:
def comb_mod(n,r):
    mod = 10**9+7
    ans = 1
    for i in range(r):
        ans *= n-i
        ans %= mod
    for i in range(1,r+1):
        ans *= pow(i,mod-2,mod)
        ans %= mod
    return ans

def solve():
    n, a, b = list(map(int, input().split()))
    mod = 10**9+7
    ans = pow(2,n,mod)-comb_mod(n,a)-comb_mod(n,b)-1
    ans %= mod
    return ans
print((solve()))


n, a, b = map(int, input().split())
mod = 10**9+7

x = 1
d = [2]
m = n
for i in range(30):
    if m&1:
        x *= d[-1]
        x %= mod
    m >>= 1
    d.append(d[-1]**2%mod)

l = n
inverse = [0, 1]
g = [1, 1]
for i in range(2, 4**9):
    if i == a+1:
        x -= l*g[-1]%mod
    if i == b+1:
        x -= l*g[-1]%mod
        break
    l *= n-i+1
    l %= mod
    inverse.append((-inverse[mod%i]*(mod//i))%mod)
    g.append(g[-1]*inverse[-1]%mod)

print((x-1)%mod)

def main():
    #input data
    import sys
    input = lambda:sys.stdin.readline().strip()
    
    N,A,B = map(int,input().split())
    mod=10**9+7
    #solve
    #二項係数の和=2**n
    #2**n-1-nCa-nCb
    def cmb(n, r, mod=10**9+7):
        r = min(r, n-r)
        res = 1
        for i in range(r):
            res = res * (n - i) * pow(i+1, mod-2, mod) % mod
        return res
                
    ans = pow(2,N,mod)-1-cmb(N,A,mod)-cmb(N,B,mod)
    print(ans%mod)

def __starting_point():
    main()
__starting_point()

n,a,b = map(int,input().split())
#sousuu = (2**n -1)%(10**9+7)

def cmb(n, r, mod):
    inv = [0,1]
    for i in range(2, r + 1):
        inv.append((-inv[mod % i] * (mod // i)) % mod)
    cmd = 1
    for i in range(1,min(r,n-r)+1):
        cmd = (cmd*(n-i+1)*inv[i])%mod
    return cmd

exceptA = cmb(n,a,10**9+7)
exceptB = cmb(n,b,10**9+7)

#print((sousuu-exceptA-exceptB)%(10**9+7))

#繰り返し2乗法
def modPow(a,n,mod):
    if n==0:
        return 1
    if n==1:
        return a%mod
    if n % 2 == 1:
        return (a*modPow(a,n-1,mod)) % mod
    t = modPow(a,n/2,mod)
    return (t*t)%mod

print((modPow(2,n,10**9+7)-1-exceptA-exceptB)%(10**9+7))

def calc_pow(x, y):
    if y == 0:
        return 1

    else:
        ans = calc_pow(x, y//2)**2

        if y%2:
            ans *= x
        
        return ans % 1000000007

def calc_X(c):
    X = 1
    k = n
    for i in range(c):
        X = (X * k) % 1000000007
        k = k-1

    return X

def calc_Y(c):
    Y = 1
    for i in range(1, c+1):
        Y = (Y * i) % 1000000007

    return Y

n, a, b = list(map(int, input().split()))

ans = calc_pow(2, n) - 1

XYa = (calc_X(a) * calc_pow(calc_Y(a), 1000000005)) % 1000000007
XYb = (calc_X(b) * calc_pow(calc_Y(b), 1000000005)) % 1000000007

ans = (ans - XYa - XYb) % 1000000007
print(ans)


n,a,b=list(map(int,input().split()))
mod=10**9+7
factna=[n]
factnb=[n]
facta=[a]
factb=[b]
for i in range(1,a):
  factna.append(factna[-1]*(n-i)%mod)
  facta.append(facta[-1]*(a-i)%mod)
for i in range(1,b):
  factnb.append(factnb[-1]*(n-i)%mod)
  factb.append(factb[-1]*(b-i)%mod)
def pow(x,n):
  a=1
  while(n>0):
    if n%2==1:
      a*=x%mod
    x*=x%mod
    n>>=1
  return a
print(((pow(2,n)-1-factna[-1]*pow(facta[-1],mod-2)%mod-factnb[-1]*pow(factb[-1],mod-2)%mod)%mod))


#フェルマーの小定理
#繰り返し2乗法

n, a, b = map(int,input().split())
mod = pow(10, 9) + 7
s = pow(2, n, mod) - 1
x = 1
y = 1
for i in range(1, b+1):
  x = x * (n-i+1) % mod
  y = y * i % mod
  if i == a or i == b:
    s -= x * pow(y, mod - 2, mod)

print(s % mod)

n,a,b = map(int, input().split())
mod = 10**9+7

def cmb(n,r):
    a,b = 1,1
    for i in range(r):
        a = a * (n-i) % mod
        b = b * (i+1) % mod
    return a * pow(b, mod-2, mod) %mod

print((pow(2, n, mod) - cmb(n,a) - cmb(n,b) - 1)%mod)

n, a, b = map(int, input().split())
mod = pow(10, 9) + 7
total = pow(2, n, mod)
#print(total)
def comb(m, x):
  numerator = 1
  for i in range(m - x + 1, m + 1):
    numerator = numerator * i % mod
  denominator = 1
  for i in range(1, x + 1):
    denominator = denominator * i % mod
  d = pow(denominator, mod - 2, mod)
  return numerator * d
a = comb(n, a)
b = comb(n, b)
print((total - a - b - 1) % mod)

#!/usr/bin/env python3
def main():
    from math import factorial

    def calc(x):
        ret = 1
        for i in range(x):
            ret = ret * (n - i) % mod
        return ret * pow(factorial(x), mod - 2, mod) % mod

    n, a, b = list(map(int, input().split()))
    mod = 10 ** 9 + 7

    print((max(0, (pow(2, n, mod) - ((calc(a) + calc(b)) % mod) - 1) % mod)))


def __starting_point():
    main()

__starting_point()

def calc_pow(x, y):
    if y == 0:
        return 1

    else:
        ans = calc_pow(x, y//2)**2

        if y%2:
            ans *= x
        
        return ans % 1000000007


def calc_combination(n, r, p):
    fact = 1
    factinv = 1

    r = min(r, n-r)

    for i in range(r):
        fact = (fact * (n - i)) % p
        factinv = (factinv * (i + 1)) % p

    ans = (fact * calc_pow(factinv, p-2)) % p

    return ans

n, a, b = map(int, input().split())
p = 10**9 + 7


ans = (calc_pow(2, n) - calc_combination(n, a, p) - calc_combination(n, b, p) - 1) % p

print(ans)

m = 10**9+7
n,a,b = map(int,input().split())
def c(k):
  v = 1
  w = 1
  for i in range(k):
    v = v*(n-i)%m #n*(n-1)*...*(n-k+1) 分子
    w = w*(i+1)%m #1*2*...*k 分母
  #pow(w,m-2,m)はmod mの世界でのwの逆元
  return (v*pow(w,m-2,m)%m)
print((pow(2,n,m)-1-c(a)-c(b))%m)

n,a,b=map(int,input().split())
m=10**9+7
ALL=pow(2,n,m)-1
x=y=1

for i in range(b):
    x=x*(i+1)%m
    y=y*(n-i)%m
    if i+1==a:
        a=b
        ALL-=y*pow(x,m-2,m)

print(ALL%m)

#!/usr/bin/env python3
from functools import reduce

mod = 10**9 + 7


def cmb(n, r, m):
    def mul(a, b):
        return a * b % m

    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, list(range(n, n - r, -1)))
    under = reduce(mul, list(range(1, r + 1)))
    return over * pow(under, m - 2, m)


n, a, b = list(map(int, input().split()))
print(((pow(2, n, mod) - 1 - cmb(n, a, mod) - cmb(n, b, mod)) % mod))


def modinv(a, m):
    b = m
    u = 1
    v = 0
    while b:
        t = a // b
        a -= t * b
        a, b = b, a
        u -= t * v
        u, v = v, u
    u %= m
    if u < 0:
        u += m
    return u

def nCk(N, k, mod):
    ret_val = 1
    for i in range(k):
        ret_val *= (N - i)
        ret_val %= mod
        ret_val *= modinv(i + 1, mod)
        ret_val %= mod
    return ret_val


n, a, b = map(int, input().split())
MOD = 10 ** 9 + 7
all_cnt = pow(2, n, MOD) - 1
a_cnt = nCk(n, a, MOD)
b_cnt = nCk(n, b, MOD)
ans = all_cnt - a_cnt - b_cnt
print(ans % MOD)

"""
繰り返し2乗法
フェルマーの小定理
"""

n, a, b = list(map(int, input().split()))
MOD = (10**9) + 7

def cal(n, a):
    r = n
    sub = 1
    while a > 1:
        if a % 2 == 1:
            a -= 1
            sub = (sub * r) % MOD
        r = (r * r) % MOD
        a /= 2
    return r*sub%MOD
        

def felmer(n,a,b):
    r = [0,0]
    ni = n
    ab = 1
    for i in range(1,max(a,b)+1):
        ab = ab * i % MOD
        if i == a:
            r[0] = (ni * cal(ab, MOD-2)) % MOD
        elif i == b:
            r[1] = (ni * cal(ab, MOD-2)) % MOD
        ni = ni * (n-i) % MOD
    return r
    
    
allNumber = cal(2, n)
nCa, nCb = felmer(n, a, b)
ans = allNumber - 1 - nCa - nCb
ans %= MOD
if ans < 0:
    ans += MOD
print(ans)


MOD = 1_000_000_007


def mod_pow(x, n):
    ret = 1
    while n > 0:
        if n & 1:
            ret = ret * x % MOD
        x = x * x % MOD
        n >>= 1
    return ret


n, a, b = [int(x) for x in input().split()]

ans = mod_pow(2, n) - 1

xa = n
for i in range(n - 1, n - a, -1):
    xa = xa * i % MOD
ya = a
for i in range(a - 1, 0, -1):
    ya = ya * i % MOD

xb = n
for i in range(n - 1, n - b, -1):
    xb = xb * i % MOD
yb = b
for i in range(b - 1, 0, -1):
    yb = yb * i % MOD

ca = xa * mod_pow(ya, MOD - 2) % MOD
cb = xb * mod_pow(yb, MOD - 2) % MOD
ans = (ans + MOD * 2 - ca - cb) % MOD
print(ans)


def comb_mod(n,r):
    mod = 10**9+7
    ans = 1
    for i in range(r):
        ans *= n-i
        ans %= mod
    for i in range(1,r+1):
        ans *= pow(i,-1,mod)
        ans %= mod
    return ans

def solve():
    n, a, b = map(int, input().split())
    mod = 10**9+7
    ans = pow(2,n,mod)-comb_mod(n,a)-comb_mod(n,b)-1
    ans %= mod
    return ans
print(solve())

n,a,b=map(int,input().split())
m=10**9+7
ALL=pow(2,n,m)-1
x=y=1
 
for i in range(b):
    x=x*(i+1)%m
    y=y*(n-i)%m
    if i+1==a:
        a=b
        ALL-=y*pow(x,m-2,m)
 
print(ALL%m)

# D - Bouquet
n,a,b = map(int,input().split())
MOD = 10**9+7

ans = pow(2,n,MOD)-1
a,b = min(a,b),max(a,b)

tmp = 1
for i in range(1,a+1):
    tmp = tmp*(n+1-i)*pow(i,-1,MOD)
    tmp %= MOD
ans = (ans-tmp)%MOD
for i in range(a+1,b+1):
    tmp = tmp*(n+1-i)*pow(i,-1,MOD)
    tmp %= MOD
ans = (ans-tmp)%MOD

print(ans)

def main():
    #input data
    import sys
    input = lambda:sys.stdin.readline().strip()
    
    N,A,B = map(int,input().split())
    mod=10**9+7
    #solve
    #二項係数の和=2**n
    #2**n-1-nCa-nCb
    
    def cmb(n, r, mod=10**9+7):
        c = 1
        m = 1
        r = min(n - r, r)
        for i in range(r):
            c = c * (n - i) % mod
            m = m * (i + 1) % mod
        return c * pow(m, mod - 2, mod) % mod
                
    ans = pow(2,N,mod)-1-cmb(N,A,mod)-cmb(N,B,mod)
    print(ans%mod)

def __starting_point():
    main()
__starting_point()

#全体の通り数が、2^(N) 通り（全ての花を「選ぶ」「選ばない」の２択）
#したがって、求める値は　2^(N) - 1 - nCa - nCb
#（全体から０本・a本・b本の時を引く）


#全体の通り数 2^(N)をより早く回す関数
def calc_pow(x, y):
    if y == 0:
        return 1

    else:
        ans = calc_pow(x, y//2)**2

        if y%2:
            ans *= x
        
        return ans % 1000000007



#nCa、nCbを求める関数
def calc_combination(n,r,p):
    fact = 1
    factinv = 1
    r = min(r,n-r)

    for i in range(r):
        fact = (fact * (n-i)) % p
        factinv = (factinv * (i+1)) % p
    
    ans = (fact * calc_pow(factinv,p-2)) % p

    return ans

n,a,b = list(map(int,input().split()))
p = 10**9 + 7
ans = (calc_pow(2,n) - calc_combination(n,a,p) - calc_combination(n,b,p)- 1 )%p

print(ans)


 






import sys

N_MAX = 200000 + 5
INF = 10**9 + 7
sys.setrecursionlimit(N_MAX)
MOD = 10**9 + 7

# ## COMBINATION (MOD) ## #
MOD = 10**9 + 7  # , N = 2*10**5 で 0.3s
N_MAX = 2 * 10**5  # 問題サイズに合わせて変えておく

fac = [1, 1]  # 元テーブル
facinv = [1, 1]  # 逆元テーブル
inv = [0, 1]  # 逆元テーブル計算用テーブル

for i in range(2, N_MAX + 1):
    fac.append((fac[-1] * i) % MOD)
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
    facinv.append((facinv[-1] * inv[-1]) % MOD)


def fac(n, a):
    ans = 1
    for i in range(a):
        ans *= n
        ans %= MOD
        n -= 1
    return ans


def cmb(n, r):
    if (r < 0 or r > n):
        return 0
    # r = min(r, n-r)
    return fac[n] * facinv[r] * facinv[n - r] % MOD


def main():
    n, a, b = map(int, sys.stdin.readline().rstrip().split())

    # 全種類
    ans = pow(2, n, MOD) - 1  # -1 : 全部選ばない場合
    ans %= MOD

    # a種類になる場合
    ans -= fac(n, a) * facinv[a]
    ans %= MOD

    ans -= fac(n, b) * facinv[b]
    ans %= MOD

    print(ans)


main()

n, a, b = list(map(int, input().split()))
M = 10**9+7

def combination(n, k):
  if k > n-k:
    k = n-k
  if k==0:
    return 1
  if k==1:
    return n
  p = [-1 for i in range(k+1)]
  kp = {i:[] for i in range(n-k+1, n+1)}
  count = [0 for i in range(k+1)]
  for i in range(2, k+1):
    if p[i]==-1:
      for j in range(i, k+1, i):
        if p[j] == -1:
          p[j] = i
      for j in range(((n-k)//i+1)*i, n+1, i):
        kp[j].append(i)
  for i in range(2, k+1):
    j = i
    while p[j] != -1:
      m = p[j]
      while j%m==0:
        count[m] += 1
        j = j//m
  #print(p)
  #print(count)
  ans = 1
  for i in kp:
    bufi = i
    for j in kp[i]:
      while count[j]>0 and bufi%j == 0:
        bufi = bufi//j
        count[j] -= 1
    #print(i, bufi)
    ans *= bufi
    ans %= M

  #print(kp)
  return ans
  
print(((pow(2,n,M)-1-combination(n, a)-combination(n, b))%M))


n, a, b = map(int, input().split())
mod = 10**9+7
ans = pow(2, n, mod)-1
x, y = 1, 1
for i in range(a):
    x *= n-i
    y *= i+1
    x, y = x%mod, y%mod
ans -= (x*pow(y, mod-2, mod))%mod
x, y = 1, 1
for i in range(b):
    x *= n-i
    y *= i+1
    x, y = x%mod, y%mod
ans -= (x*pow(y, mod-2, mod))%mod
print(ans%mod)

n,a,b=list(map(int,input().split()))
#2^n-nCa-nCbを求める
#冪乗を求める関数を求める
#2のn乗をmで割ったあまりを求める
def pow(a,n,m):
  if n==0:
    return 1
  else:
    k=pow(a*a%m,n//2,m)
    if n%2==1:
      k=k*a%m
    return k
#次は組み合わせを計算する
#まずは前処理をする
inv=[0 for i in range(200001)]
finv=[0 for i in range(200001)]
inv[1]=1
finv[1]=1
for i in range(2,200001):
  #逆元の求め方p=(p//a)*a+p%a a^(-1)=-(p//a)*(p%a)^(-1)
  inv[i]=(-(1000000007//i)*inv[1000000007%i])%1000000007
  finv[i]=finv[i-1]*inv[i]%1000000007

#nが10^7程度であればnCk=n!*(k!)*((n-k)!)を求めればいい
#nがそれより大きい時は間に合わない。ここでkが小さいことに着目すると
#nCk=n*(n-1).....*(n-k+1)*(k!)^(-1)で求められることがわかる
a_num=1
b_num=1
for i in range(n-a+1,n+1):
  a_num=i*a_num%1000000007
for i in range(n-b+1,n+1):
  b_num=i*b_num%1000000007
print(((pow(2,n,1000000007)-1-a_num*finv[a]-b_num*finv[b])%1000000007))

  













def main():
    n, a, b = list(map(int, input().split()))
    mod = 10 ** 9 + 7 #素数
    
    def modpow(x, n, mod):
        res = 1
        while n:
            if n % 2:
                res *= x % mod
            x *= x % mod
            n >>= 1
        return res
    
    def cmb(n, r, mod):
        # 分子(n*(n-1)*...*(n-r+1))
        nume = 1
        for i in range(n-r+1, n+1):
            nume = nume * i % mod
        # 分母（1*2*...*r）
        deno = 1
        for j in range(1, r+1):
            deno = deno * j % mod
        d = modpow(deno, mod-2, mod)
        return nume * d % mod
    
    all_cmb = pow(2, n, mod) - 1
    bad_a = cmb(n, a, mod)
    bad_b = cmb(n, b, mod)    
    print(((all_cmb-bad_a-bad_b) % mod))

def __starting_point():
    main()


__starting_point()

n, a, b = map(int, input().split())

MOD = 10**9 + 7

fact = [1, 1]
factn = [1, n % MOD]
for i in range(2, b + 1):
    factn.append((factn[-1] * (n - i + 1)) % MOD)
    fact.append((fact[-1] * i) % MOD)

nca = (factn[a] * pow(fact[a], MOD-2, MOD)) % MOD
ncb = (factn[b] * pow(fact[b], MOD-2, MOD)) % MOD
ans = (pow(2,  n , MOD) - 1 - nca - ncb) % MOD
if ans < 0: ans += MOD
print(ans)

n, a, b = list(map(int, input().split()))
mod = 10**9+7

def nCk(n, k):
    a = 1
    for i in range(n, n-k, -1):
        a *= i
        a %= mod
    b = 1
    for i in range(1, k+1):
        b *= i
        b %= mod
    a *= pow(b, mod-2, mod)
    return a

ans = pow(2, n, mod)-1
ans -= nCk(n, a)+nCk(n, b)
print((ans%mod))


n,a,b = map(int,input().split())
p = 10**9 + 7
def CC(n,k):
  X,Y = 1,1
  for i in range(n-k+1,n+1):
    X = X*i%p
  for j in range(1,k+1):
    Y = Y*j%p
  YY = pow(Y,p-2,p)
  return(X*YY%p)
A = CC(n,a)
B = CC(n,b)
ALL = pow(2,n,p)
ans = (ALL-1-A-B)%p
print(ans)

def calc_comb(n,r):
    numerator=1
    for i in range(n-r+1,n+1):
        numerator=(numerator*i)%mod
    denominator=1
    for i in range(1,r+1):
        denominator=(denominator*i)%mod
    return (numerator*pow(denominator,mod-2,mod))%mod
n,a,b=list(map(int,input().split()))
mod=1000000007
print(((pow(2,n,mod)-1-calc_comb(n,a)-calc_comb(n,b)+mod)%mod))



#!/usr/bin/env python
# coding: utf-8

# In[1]:


n,a,b = list(map(int, input().split()))


# In[2]:


def nCk(n, k, mod):
    a = 1
    for i in range(n, n-k, -1):
        a *= i
        a %= mod
    b = 1
    for i in range(1, k+1):
        b *= i
        b %= mod
    a *= pow(b, mod-2, mod)
    return a


# In[3]:


mod = 10**9+7
ans = pow(2, n, mod)-1
ans -= nCk(n, a, mod) + nCk(n, b, mod)
print((ans%mod))


# In[ ]:






n,a,b=map(int,input().split())

mod=10**9+7
def modpow(a,n):
    if n<1:
        return 1
    ans=modpow(a,n//2)
    ans=(ans*ans)%mod
    if n%2==1:
        ans*=a
    return ans%mod
    
def cmb(n,i):#逆元
    inv,ans=1,1
    for j in range(1,i+1):
        ans=ans*(n-j+1)%mod
        inv=inv*j%mod
    return (ans*modpow(inv,mod-2))%mod



ans_n=pow(2,n,mod)-1
ans_a=cmb(n,a)%mod
ans_b=cmb(n,b)%mod

print((ans_n-ans_a-ans_b)%mod)

def solve():
    def combis(n, k, mod):
        from math import factorial
        numerator = 1
        denominator = 1
        for i in range(k):
            numerator = numerator * (n-i) % mod
            denominator = denominator * (i+1) % mod
        return numerator * pow(denominator, mod-2, mod) % mod

    n,a,b = [int(i) for i in input().split()]
    mod = 10**9 + 7
    ans = pow(2, n, mod) - 1 - combis(n, a, mod) - combis(n, b, mod)
    print(ans % mod)

def __starting_point():
    solve()
__starting_point()

n,a,b=map(int,input().split())
mod=10**9+7
ans=pow(2,n,mod)-1
a=min(a,n-a)
b=min(b,n-b)
c=min(a,b)
x,y=1,1
for i in range(1,c+1):
  x=x*(n+1-i)%mod
  y=y*i%mod
ans-=x*pow(y,mod-2,mod)%mod
for i in range(c+1,max(a,b)+1):
  x=x*(n+1-i)%mod
  y=y*i%mod
ans-=x*pow(y,mod-2,mod)%mod
print(ans%mod)

k = 2 *10**5
mod = 10**9+7

n, a, b = map(int,input().split())

modinv_table = [-1]*(k+1)
for i in range(1,k+1):
    modinv_table[i] = pow(i,-1,mod)

def binomial_coefficients(n,k):
    ans = 1
    for i in range(k):
        ans *= n-i
        ans *= modinv_table[i+1]
        ans %= mod
    return ans
print((pow(2,n,mod)-binomial_coefficients(n,a)-binomial_coefficients(n,b)-1)%mod)

def nCk(n, k, mod):
    nu = 1
    de = 1 
    for i in range(1, k+1):
        nu *= (n-i+1)
        de *= i
        nu = nu % mod
        de = de % mod
    ans = nu * pow(de, mod-2, mod) % mod
    return ans

n, a, b = map(int, input().split())
mod = 10**9+7
ans = (pow(2, n, mod) - 1 - nCk(n, a, mod) - nCk(n, b, mod)) % mod
print(ans)

def main():
    #input data
    import sys
    input = lambda:sys.stdin.readline().strip()
    
    N,A,B = map(int,input().split())
    mod=10**9+7
    #solve
    #二項係数の和=2**n
    #2**n-1-nCa-nCb
    def pow(x, y, mod):
        res = 1
        if y > 0:
            res = pow(x, y // 2, mod)
            if y % 2 == 0:
                res = (res * res) % mod
            else:
                res = (((res * res) % mod) * x) % mod
        return res
        
    def cmb(n, r, mod=10**9+7):
        c = 1
        m = 1
        r = min(n - r, r)
        for i in range(r):
            c = c * (n - i) % mod
            m = m * (i + 1) % mod
        return c * pow(m, mod - 2, mod) % mod
                
    ans = pow(2,N,mod)-1-cmb(N,A,mod)-cmb(N,B,mod)
    print(ans%mod)

def __starting_point():
    main()
__starting_point()

n, a, b = map(int,input().split())
mod = pow(10, 9) + 7
s, x, y = pow(2, n, mod) - 1, 1, 1
for i in range(1, b+1):
  x, y = x * (n-i+1) % mod, y * i % mod
  if i == a or i == b: s -= x * pow(y, mod - 2, mod)
print(s % mod)

n,a,b=list(map(int,input().split()))
mod=10**9+7
sum=(pow(2,n,mod)-1)%mod
nume_a=1
deno_a=1
for i in range(n-a+1,n+1):
    nume_a=(nume_a*(i%mod))%mod
    deno_a=(deno_a*(i-(n-a+1)+1)%mod)%mod
ans_a=(nume_a*(pow(deno_a,mod-2,mod)))%mod
nume_b=1
deno_b=1
for i in range(n-b+1,n+1):
    nume_b=(nume_b*(i%mod))%mod
    deno_b=(deno_b*(i-(n-b+1)+1)%mod)%mod
ans_b=(nume_b*(pow(deno_b,mod-2,mod)))%mod
print(((sum-ans_a-ans_b)%mod))


n, a, b = map(int,input().split())
M = 10**9+7
Answer = pow(2,n,M)-1
factorial=1
for i in range(1,a+1):
    factorial = (factorial*(n+1-i)*pow(i,M-2,M))%M
Answer -= factorial%M
factorial =1
for j in range(1,b+1):
    factorial = (factorial*(n+1-j)*pow(j,M-2,M))%M
Answer -= factorial%M
Answer = Answer%M
print(Answer)

n, a, b = map(int, input().split())

def nCr(n, r):
    r = min(r, n-r)
    num, den = 1, 1
    for i in range(r):
        num = (num * (n-i)) % mod
        den = (den * pow(i+1, mod-2, mod)) % mod
    return num * den % mod

mod = 10**9 + 7
print((pow(2, n, mod) - nCr(n, a) - nCr(n, b) - 1) % mod)

n, a, b = list(map(int, input().split()))
mod = pow(10, 9) + 7


def comb(N, x):
    numerator = 1
    for i in range(N-x+1, N+1):
        numerator = numerator * i % mod
    denominator = 1
    for j in range(1, x+1):
        denominator = denominator * j % mod
    d = pow(denominator, mod-2, mod)
    return numerator * d % mod


a = comb(n, a)
b = comb(n, b)

print(((pow(2, n, mod) - 1 - a - b) % mod))


#!/usr/bin/env python3
from functools import reduce

mod = 10**9 + 7


def cmb(n, r, m):
    mul = lambda a,b: a*b%m
    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(mul, list(range(n, n - r, -1)))
    under = reduce(mul, list(range(1, r + 1)))
    return over * pow(under, mod - 2, mod)


n, a, b = list(map(int, input().split()))
print(((pow(2, n, mod) - 1 - cmb(n, a, mod) - cmb(n, b, mod)) % mod))


n,a,b=list(map(int,input().split()))
#2^n-nCa-nCbを求めればいい。ただし100000007で割ったあまりでなくてはならない
#まずは2^nを求める
def pow(x,n,m):
  if n==0:
    return 1
  res=pow(x*x%m,n//2,m)
  if n%2==1:
    res=res*x%m
  return res

#コンビネーションを求める
c=max(a,b)
inv=[0 for i in range(c+1)]
finv=[0 for i in range(c+1)]
inv[1]=1
finv[0]=finv[1]=1
for i in range(2,c+1):
  #iの逆数を求める。
  #mod　p=1000000007の世界で逆元を求める
  #p=(p//a)*a+(p%a)
  #mod pをとると a=-(p//a)*(p%a)^-1
  inv[i]=1000000007-(1000000007//i)*inv[1000000007%i]%1000000007
  finv[i]=finv[i-1]*inv[i]%1000000007
def kaizyou(k):
  num=1
  for i in range(n-k+1,n+1):
    num=num*i%1000000007
  return num

def combinations(k):
  return kaizyou(k)*finv[k]%1000000007

print(((pow(2,n,1000000007)-combinations(a)-combinations(b)-1)%1000000007))

  
  
  


from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n,a,b = inpl()
dl = 1
for i in range(a):
    dl *= n-i
    dl %= mod
for i in range(a):
    dl *= pow(a-i,mod-2,mod)
    dl %= mod
# print(dl)
vv = 1
for i in range(b):
    vv *= n-i
    vv %= mod
for i in range(b):
    vv *= pow(b-i,mod-2,mod)
    vv %= mod
# print(vv)
res = pow(2,n,mod) - dl - vv - 1
print(res%mod)

def ncr(n, r, p):
    num = 1
    den = 1

    for i in range(r):
        num = (num*(n-i)) % p
        den = (den*(i+1)) % p

    return (num*pow(den, p-2, p)) % p

n, a, b = list(map(int, input().split()))

m = 1000000007
print((pow(2, n, m) - 1 - ncr(n, a, m) - ncr(n, b, m)) % m)

# nCr mod m
# rがn/2に近いと非常に重くなる
def combination(n, r, mod=10**9+7):
    n1, r = n+1, min(r, n-r)
    numer = denom = 1
    for i in range(1, r+1):
        numer = numer * (n1-i) % mod
        denom = denom * i % mod
    return numer * pow(denom, mod-2, mod) % mod

mod = 10**9+7
N, A, B = list(map(int, input().split()))
ans = pow(2, N, mod) - 1 - combination(N, A) - combination(N, B)
ans %= mod
print(ans)


n, a, b = list(map(int, input().split()))
# 全通り - nCa - nCb
mod = 10 ** 9 + 7


def inv(x):
    return pow(x, mod - 2, mod)

# n ~ n - k + 1


def c(n, k):
    res = 1
    for i in range(0, k):
        res = res * (n - i) * inv(i + 1) % mod
    return res


print((((pow(2, n, mod) - c(n, a) - c(n, b) - 1) % mod + mod) % mod))


def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y

def modinv(a, m):
    g, x, y = egcd(a, m)
    if g != 1:
        raise Exception('modular inverse does not exist')
    else:
        return x % m
def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res


def power_func(a,n,p):
    bi = str(format(n,"b"))#2進表現に
    res = 1
    for i in range(len(bi)):
        res = (res*res) %p
        if bi[i] == "1":
            res = (res*a) %p
    return res



n,a,b=[int(i) for i in input().split()]
mod=10**9+7

print(((power_func(2,n,mod)-1-combination(n, a, mod)-combination(n, b, mod))%mod))


import functools
import operator

n, a, b = list(map(int, input().split()))

def nCr(n, r):
    r = min(r, n-r)
    if r == 0:
        return 1
    num = functools.reduce(lambda x, y: x*y%mod, list(range(n, n-r, -1)))
    den = functools.reduce(lambda x, y: x*y%mod, [pow(x, mod-2, mod) for x in range(1, r+1)])
    return num * den % mod

mod = 10**9 + 7
print(((pow(2, n, mod) - nCr(n, a) - nCr(n, b) - 1) % mod))


def comb(n, r, p):
    num, den = 1, 1
    r = min(r, n - r)
    for i in range(1, r + 1):
        num = num * (n - i + 1) % p
        den = den * i % p
    return num * pow(den, p - 2, p) % p


n, a, b = list(map(int, input().split()))
MOD = 1_000_000_007
ans = pow(2, n, MOD)
ans %= MOD
ans -= comb(n, a, MOD)
ans %= MOD
ans -= comb(n, b, MOD)
ans %= MOD
ans -= 1
ans %= MOD
print(ans)


import sys
# import math
# import bisect
# import numpy as np
# from decimal import Decimal
# from numba import njit, i8, u1, b1 #JIT compiler
# from itertools import combinations, product
# from collections import Counter, deque, defaultdict

# sys.setrecursionlimit(10 ** 6)
MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.14159265358979323846

def read_str():      return sys.stdin.readline().strip()
def read_int():      return int(sys.stdin.readline().strip())
def read_ints():     return map(int, sys.stdin.readline().strip().split())
def read_ints2(x):   return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())
def read_str_list(): return list(sys.stdin.readline().strip().split())
def read_int_list(): return list(map(int, sys.stdin.readline().strip().split()))
def GCD(a: int, b: int) -> int: return b if a%b==0 else GCD(b, a%b)
def LCM(a: int, b: int) -> int: return (a * b) // GCD(a, b)

def nCr(n, r):
    a, b = 1, 1
    for i in range(r):
        a = a * (n - i) % MOD
        b = b * (i + 1) % MOD
    
    return a * pow(b, MOD - 2, MOD) % MOD

def Main():
    n, a, b = read_ints()
    num = pow(2, n, MOD) - 1

    print((num - nCr(n, a) - nCr(n, b)) % MOD)   

def __starting_point():
    Main()
__starting_point()

n, a, b = list(map(int, input().split()))
mod = 10 ** 9 + 7

def inv(x):
    return pow(x, mod - 2, mod)

def c(n, k):
    ue, sita = 1, 1
    for i in range(0, k):
        ue = ue * (n - i) % mod
       	sita = sita * (i + 1) % mod
    return ue * inv(sita) % mod


print((((pow(2, n, mod) - c(n, a) - c(n, b) - 1) % mod + mod) % mod))


# import itertools
# import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np
# import heapq
# from collections import deque

# N = int(input())
# S = input()
# n, *a = map(int, open(0))
n, a, b = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]
# S = input()

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

# def factorization(n):
#     arr = []
#     temp = n
#     for i in range(2, int(-(-n**0.5//1))+1):
#         if temp%i==0:
#             cnt=0
#             while temp%i==0:
#                 cnt+=1
#                 temp //= i
#             arr.append([i, cnt])
#     if temp!=1:
#         arr.append([temp, 1])
#     if arr==[]:
#         arr.append([n, 1])
#     return arr

mod = 10 ** 9 + 7

def comb(n, m, mod = 10 ** 9 + 7):
    numerator = 1
    denominator = 1
    for i in range(1, m + 1):
        numerator = numerator * (n - i + 1) % mod
        denominator = denominator * i % mod
    d_inv = pow(denominator, mod - 2, mod)
    return numerator * d_inv % mod

cmb_n_a = comb(n, a)
cmb_n_b = comb(n, b)

print((pow(2, n, mod) - 1 - cmb_n_a - cmb_n_b) % mod)

n,a,b=map(int,input().split())
mod=pow(10, 9)+7
s,x,y=pow(2, n, mod)-1,1,1
for i in range(1,b+1):
  x,y=x*(n-i+1)%mod,y*i%mod
  if i==a or i==b: s-=x*pow(y,mod-2,mod)
print(s%mod)

MOD = 1_000_000_007
def calc_combi(n,k):
    frac=1
    denomi=1
    for i in range(n-k+1,n+1):
        frac=frac*i%MOD
    for i in range(1,k+1):
        denomi=denomi*i%MOD
    return frac*pow(denomi,MOD-2,MOD)

n, a, b = map(int,input().rstrip().split())
nca = calc_combi(n,a)
ncb = calc_combi(n,b)
print((pow(2,n,MOD)-1-nca-ncb)%MOD)

n, a, b = map(int, input().split())

MOD = 10 ** 9 + 7

def nCk(n, k):
    num = 1
    for i in range(n, n - k, -1):
        num *= i
        num %= MOD
    tmp = 1
    for i in range(1, k + 1):
        tmp *= i
        tmp %= MOD
    num *= pow(tmp, MOD - 2, MOD)
    return num

ans = pow(2, n, MOD) - 1
ans -= nCk(n, a)
ans -= nCk(n, b)
print(ans % MOD)

#より高速に
def pow(x, n ,p):
    """
    O(log n)
    """
    if n == 0:
        return 1

    K = 1
    while n > 1:
        if n % 2 != 0:
            K = (x*K) % p
        x = (x*x) % p
        n //= 2

    return (K * x) % p




def cmb3(n,r,q):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)    
    s = 1
    for x in range(n,n-r,-1):
        s = (s*x) % q
    t = 1
    for x in range(1,r+1):
        t = (t*x) % q

    #割る数の剰余をどうするかが問題
    u = pow(t,q-2,q)
    return (u * s) % q
  
n,a,b = list(map(int,input().split()))
A = pow(2,n,10**9+7)

if a <= n:
  B = cmb3(n,a,10**9+7)
else:
  B = 0
if b <= n:
  C = cmb3(n,b,10**9+7)
else:
  C = 0

print(((A-B-C-1)%(10**9+7)))



import functools
N, A, B = list(map(int, input().split()))
MOD = 10 ** 9 + 7

def modpow(x, n):
    ret = 1
    while n:
        if n & 1:
            ret = ret * x % MOD
        x = x * x % MOD
        n >>= 1
    return ret

@functools.lru_cache(maxsize=None)
def modinv(x):
    return modpow(x, MOD - 2)

def modcomb(n, r):
    ret = 1
    for i in range(n, n - r, -1):
        ret *= i
        ret %= MOD
    for i in range(r, 1, -1):
        ret *= modinv(i)
        ret %= MOD
    return ret

total = modpow(2, N) - 1
ans = total - (modcomb(N, A) + modcomb(N, B))
ans %= MOD
print(ans)


n,a,b=map(int,input().split())
p=10**9+7

def cmb(n, r):
  # 分子(n*(n-1)*...*(n-r+1))
  nume = 1
  for i in range(n-r+1, n+1):
    nume = nume * i % p
  # 分母（1*2*...*r）
  deno = 1
  for j in range(1, r+1):
    deno = deno * j % p
    d = pow(deno, p-2, p)
  return nume * d

nca = cmb(n, a)
ncb = cmb(n, b)
res = pow(2, n, p) - nca - ncb - 1
print(res%p)

n, a, b = list(map(int, input().split()))
if a > b: a, b = b, a
mod = 10 ** 9 + 7
tmp = 1

C = n
ans = 0
if a == 1: Ca = n
for r in range(1, n + 1):
    C = (((C * (n - r)) % mod )* pow(r + 1, mod - 2, mod)) % mod
    if r == a - 1:
        Ca = C
    if r == b - 1:
        Cb = C
        break

print(((pow(2, n, mod) - Ca - Cb - 1) % mod))


def main():
    n, a, b = map(int, input().split())
    mod = 10 ** 9 + 7 #素数
    
    def modpow(x, n, mod):
        res = 1
        while n:
            if n % 2:
                res *= x % mod
            x *= x % mod
            n >>= 1
        return res
    
    def cmb(n, r):
        # 分子(n*(n-1)*...*(n-r+1))
        nume = 1
        for i in range(n-r+1, n+1):
            nume = nume * i % mod
        # 分母（1*2*...*r）
        deno = 1
        for j in range(1, r+1):
            deno = deno * j % mod
        d = modpow(deno, mod-2, mod)
        return nume * d
    
    all_cmb = pow(2, n, mod) - 1
    bad_a = cmb(n, a)
    bad_b = cmb(n, b)    
    print((all_cmb-bad_a-bad_b) % mod)

def __starting_point():
    main()
__starting_point()

def modinv(a, m):
    b = m
    u = 1
    v = 0
    while b:
        t = a // b
        a -= t * b
        a, b = b, a
        u -= t * v
        u, v = v, u
    u %= m
    if u < 0:
        u += m
    return u

def nCk(N, k, mod):
    ret_val = 1
    for i in range(k):
        ret_val *= (N - i)
        ret_val %= mod
        ret_val *= modinv(i + 1, mod)
        ret_val %= mod
    return ret_val


n, a, b = list(map(int, input().split()))
MOD = 10 ** 9 + 7
all_cnt = pow(2, n, MOD) - 1
a_cnt = nCk(n, a, MOD)
b_cnt = nCk(n, b, MOD)
ans = all_cnt - a_cnt - b_cnt
while ans < 0:
    ans += MOD
print(ans)


import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return list(map(int, input().split()))
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

def main():
    n,a,b = i_map()
    s = pow(2,n,MOD) - 1

    def fur(n,r):
        p,q = 1, 1
        for i in range(r):
            p = p*(n-i)%MOD
            q = q*(i+1)%MOD
        return (p * pow(q,MOD-2,MOD)) % MOD

    print(((s - fur(n,a) - fur(n,b)) % MOD))



def __starting_point():
    main()

__starting_point()

#powは繰り返し2乗法により指数計算を行う関数
mod=10**9+7
n,a,b=list(map(int,input().split()))

ans=pow(2,n,mod)-1 #n種類の花を使って花束を作る総数は2^n-1通り

comb1=1 #nCaの計算
for i in range(n-a+1,n+1): #n*(n-1)*…*(n-a+1)を計算
    comb1*=i
    comb1%=mod
for i in range(1,a+1): #1/a!=1/(1*2*…*a)=1^(p-2)*2^(p-2)*…*a^(p-2) (p=10**9+7)を計算
    comb1*=pow(i,mod-2,mod) # iの逆元 →　1/iした際に かける(iの逆元)とすればあまりが求まる
    comb1%=mod

comb2=1
for i in range(n-b+1,n+1): #n*(n-1)*…*(n-b+1)を計算
    comb2*=i
    comb2%=mod
for i in range(1,b+1): #1/b!=1/(1*2*…*b)=1^(p-2)*2^(p-2)*…*b^(p-2) (p=10**9+7)を計算
    comb2*=pow(i,mod-2,mod)
    comb2%=mod

ans-=(comb1+comb2) #nCa、nCbを総数から引く
ans%=mod
print(ans)


n,a,b = map(int,input().split())
mod = 10**9 + 7
ans = pow(2,n,mod) - 1
fa = 1
fb = 1
for i in range(1, a+1):
    fa *= i
    fa %= mod
for i in range(1, b+1):
    fb *= i
    fb %= mod

fa = pow(fa, mod-2, mod)
fb = pow(fb, mod-2, mod)

for i in range(a):
    fa *= n - i
    fa %= mod
for i in range(b):
    fb *= n - i
    fb %= mod

print((ans - fa - fb) % mod)

import math
import numpy as np
n,a,b=map(int,input().split())
mod=10**9+7
factna=[n]
factnb=[n]
facta=[a]
factb=[b]

for i in range(1,a):
  factna.append(factna[-1]*(n-i)%mod)
  facta.append(facta[-1]*(a-i)%mod)

for i in range(1,b):
  factnb.append(factnb[-1]*(n-i)%mod)
  factb.append(factb[-1]*(b-i)%mod)

def pow(x,n):
  a=1
  while(n>0):
    if n%2==1:
      a*=x%mod
    x*=x%mod
    n>>=1
  return a
A=pow(2,n)%mod
B=factna[-1]*pow(facta[-1],mod-2)%mod
C=factnb[-1]*pow(factb[-1],mod-2)%mod
#print(factna,factb)
print((A-B-C-1)%mod)

n, a, b = map(int, input().split())

MOD = 10 ** 9 + 7

def modinv(x, mod):
    return pow(x, mod-2, mod)

modinv_table = [-1] * (b+1)
for i in range(1, b+1):
    modinv_table[i] = modinv(i, MOD)

def comb(n, k, mod):
    ans = 1
    for i in range(k):
        ans *= n-i
        ans *= modinv_table[i + 1]
        ans %= mod
    return ans
  
ans = (pow(2, n, MOD) - comb(n, a, MOD) - comb(n, b, MOD)) % MOD - 1

print(ans)

n,a,b = map(int,input().split())

mod = 10**9+7

all_combi = pow(2,n,mod)




p = 1
q = 1

for i in range(b):
    
    p *= n-i
    p %= mod
    q *= i+1
    q %= mod
    
    if i==a-1:
        nca = p * pow(q,-1,mod) % mod
        
    if i==b-1:
        ncb = p * pow(q,-1,mod) % mod

        
ans = all_combi -nca -ncb -1
ans %= (10**9+7)
    
print(ans)



def main():
    n, a, b = list(map(int, input().split()))
    mod = 10 ** 9 + 7

    def cmb(n, r):
        if n - r < r: r = n - r
        if r == 0: return 1
        if r == 1: return n

        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]

        for p in range(2, r + 1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p - 1, r, p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot

        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
                result %= 10**9+7

        return result

    print((int(
        ((pow(2, n, mod) - 1) % mod
         - (cmb(n, a)) % mod
         - (cmb(n, b)) % mod)
        % mod)
    ))


main()



n, a, b = map(int, input().split())

MOD = 10**9 + 7
N = pow(2,n,MOD)

def com(n,r):
    s = 1
    for i in range(n-r+1, n+1):
        s *= i
        s %= MOD

    t = 1
    for j in range(1,r+1):
        t *= j
        t %= MOD


    return s * pow(t,MOD-2, MOD) % MOD

print((N - com(n, a) - com(n, b) - 1) % (MOD))

def modpow(a, n, p):
    if n == 1:
        ans = a % p
    else:
        if n % 2 == 0:
            ans = (modpow(a, n // 2, p) ** 2) % p
        else: # n % 2 == 1
            ans = (a * (modpow(a, n // 2, p) ** 2)) % p

    return ans

p = 10 ** 9 + 7
n, a, b = [int(x) for x in input().split()]

tot = modpow(2, n, p)

Xa, Ya = 1, 1
for i in range(a):
    Xa = (Xa * (n - i)) % p
    Ya = (Ya * (i + 1)) % p
Za = modpow(Ya, p - 2, p)
nCa = (Xa * Za) % p

Xb, Yb = 1, 1
for i in range(b):
    Xb = (Xb * (n - i)) % p
    Yb = (Yb * (i + 1)) % p
Zb = modpow(Yb, p - 2, p)
nCb = (Xb * Zb) % p

ans = (tot - nCa -nCb - 1) % p

print(ans)

n, a, b = map(int, input().split())

mod = 10**9 + 7

ans = pow(2, n, mod)

ans -= 1

aa = 1
for i in range(1, a+1):
    aa = (aa * (n - i + 1) * pow(i, -1, mod)) % mod

bb = 1
for i in range(1, b+1):
    bb = (bb * (n - i + 1) * pow(i, -1, mod)) % mod

ans = (ans - aa - bb) % mod

print(ans)

# -*- coding: utf-8 -*-
"""
Created on Sun Sep 13 19:51:37 2020

@author: liang
"""

import math

key = 10**9 + 7

n, a, b = map(int,input().split())

ans = 1
tmp = 2
N = math.ceil(math.log2(n))

#繰り返し二乗法
for i in range(N+1):
    if n>>i&1 == 1:
        #print(i,tmp)
        ans *= tmp
    tmp *= tmp
    tmp %= key
    ans %= key
ans -= 1
#print("1",ans)

def comb(r):
    #permutation
    perm = 1
    for i in range(0,r):
        perm *= n - i
        perm %= key
    
    #factorial
    fact = 1
    for i in range(1,r+1):
        fact *= i
        fact %= key
    
    ans = 1
    tmp = fact
    p = key -2
    N = math.ceil(math.log2(p))
    #繰り返し二乗法
    for i in range(N):
        if  p >>i&1 == 1:
            #print(i,tmp)
            ans *= tmp
        tmp *= tmp
        tmp %= key
        ans %= key
    ans *= perm
    ans %= key
    return ans

ans -= comb(a)
ans -= comb(b)
ans %= key
#print("2",comb(a))
#print("3",comb(b))
print(ans)

from math import factorial
n, a, b = [int(i) for i in input().split()]
mod = 10 ** 9 + 7

def nCr(n, r):
    nonlocal mod
    ans = 1
    for i in range(r):
        ans = (ans * (n-i)) % mod
    return (ans * pow(factorial(r), mod-2, mod)) % mod

print((pow(2, n, mod) - nCr(n, a) - nCr(n, b) - 1) % mod) 

n,a,b=map(int,input().split())

def genCombinationFunction(max_k,mod):
    modinv_table = [-1] * (max_k+1)
    modinv_table[1] = 1
    for i in range(2, max_k+1):
        modinv_table[i] = (-modinv_table[mod % i] * (mod // i)) % mod

    def binomial_coefficients(n, k):
        ans = 1
        for i in range(k):
            ans *= n-i
            ans *= modinv_table[i + 1]
            ans %= mod
        return ans
    return binomial_coefficients

  
max_k = 2 * 10 ** 5
mod = 10**9 + 7
f=genCombinationFunction(max_k,mod)


ans=pow(2,n,mod)-1
ans-=f(n,a)
ans-=f(n,b)
print(ans%mod)

n, a, b = map(int, input().split())
mod = pow(10, 9) + 7
 
def comb(N, x):
    numerator = 1
    for i in range(N-x+1, N+1):
        numerator = numerator * i % mod
    denominator = 1
    for j in range(1, x+1):
        denominator = denominator * j % mod
    d = pow(denominator, mod-2, mod)
    return numerator * d
 
a = comb(n, a)
b = comb(n, b)
 
print((pow(2, n, mod) -1 -a -b) % mod)

mod = 1000000007

def mod_cmb(n: int, k: int, p: int) -> int:
    if n < 0 or k < 0 or n < k: return 0
    if n == 0 or k == 0: return 1
    if (k > n - k):
        return mod_cmb(n, n - k, p)
    c = d = 1
    for i in range(k):
        c *= (n - i)
        d *= (k - i)
        c %= p
        d %= p
    return c * pow(d, -1, p) % p

def main():
    n, a, b = list(map(int, input().split()))

    ans = pow(2, n, mod) - 1

    tmp_a = mod_cmb(n , a, mod)
    tmp_b = mod_cmb(n , b, mod)

    print(((ans-tmp_a-tmp_b)%mod))

def __starting_point():
    main()

__starting_point()

#!/usr/bin/env python3
from functools import reduce
from operator import mul

mod = 10**9 + 7


def cmb(n, r):
    r = min(n - r, r)
    if r == 0:
        return 1
    over = reduce(lambda a, b: a * b % mod, list(range(n, n - r, -1)))
    under = reduce(lambda a, b: a * b % mod, list(range(1, r + 1)))
    return over * pow(under,mod-2,mod)


n, a, b = list(map(int, input().split()))
print(((pow(2, n, mod) - 1 - cmb(n, a) - cmb(n, b)) % mod))


import math

def main():
	n, a, b = [int(x) for x in input().split(" ")]
	# 2^n - 1 - nCa - nCb
	p = 1000000007
	a = min([a, n - a])
	b = min([b, n - b])
	M = max([a, b])
	f = [1, 1]
	finv = []
	for i in range(M):
		f.append((f[-1] * (i + 2)) % p)
	lf = len(f)
	finv.append(modpower(f[-1], p - 2, p))
	for i in range(lf - 1):
		finv.append((finv[-1] * (lf - i - 1)) % p)
	na = 1
	nb = 1
	for i in range(M):
		if a > i:
			na = (na * (n - i)) % p
		if b > i:
			nb = (nb * (n - i)) % p
	print((modpower(2, n, p) - 1 - (na * finv[lf - 1 - a]) % p - (nb * finv[lf - 1 - b]) % p) % p)


def modpower(a, p, d): # a^p % d
	pp = [a]
	for i in range(int(math.log2(p)) + 1):
		pp.append((pp[-1] ** 2) % d)
	b_p = format(p, 'b')
	m = 1
	for i in range(len(b_p)):
		if b_p[-i-1] == "1":
			m = (m * pp[i]) % d
	return m

main()

n,a,b=map(int,input().split())
def fact(n,p):
    a=1
    for i in range(1,n+1):
        a=(a*i)%p
    return a
def bfact(n,x,p):
    a=1
    for i in range(n-x+1,n+1):
        a=(a*i)%p
    return a
p=10**9+7
na=bfact(n,a,p)%p
nb=bfact(n,b,p)%p
aa=fact(a,p)%p
bb=fact(b,p)%p
aaa=pow(aa,-1,p)
bbb=pow(bb,-1,p)
ans=pow(2,n,p)-1
ans-=(na*aaa+nb*bbb)
print(ans%p)

n, a, b = list(map(int, input().split()))
mod = 10**9+7

def cmb2(n, r, mod):
    res = 1
    temp = 1
    for k in range(1, r+1):
        res *= (n-k+1)
        temp *= k
        res %= mod
        temp %= mod
    res *= pow(temp,(mod-2),mod)
    res %= mod
    return res

def power(a, n, mod):
    bi=str(format(n,"b")) #2進数
    res=1
    for i in range(len(bi)):
        res=(res*res) %mod
        if bi[i]=="1":
            res=(res*a) %mod
    return res

ans = power(2, n, mod) - cmb2(n, a, mod) - cmb2(n, b, mod) -1
ans %= mod
print(ans)


mod = 10**9+7
n,a,b = map(int,input().split())
def combination(n, a):
    res = 1
    div = 1
    for i in range(a):
        res *= n-i
        res %= mod
        div *= a - i
        div %= mod
    res = (res * pow(div, mod-2, mod)) % mod
    return res
print((pow(2,n,mod)-1-combination(n,a)-combination(n,b))%mod)

n,a,b=list(map(int,input().split()))
mod=1000000007
c=[1]*(b+1)
def com(n,b):
    for i in range(1,b+1):
        c[i]=c[i-1]*((n-i+1)*pow(i,mod-2,mod))%mod
com(n,b)
ans=(pow(2,n,mod)-c[a]-c[b]-1)%mod

print(ans)


def cmb(a,b,c):
    b = min(b,a-b)
    num = 1
    for i in range(b):
        num = num*(n-i) % c
    den = 1
    for i in range(b):
        den = den*(i+1) % c
    return num*pow(den,-1,c) % c
mod = 10**9+7
n,a,b = map(int,input().split())
ans  = (pow(2,n,mod)-cmb(n,a,mod)-cmb(n,b,mod)-1) % mod
if ans < 0:
    ans = ans + mod
print(ans)

n, a, b = map(int,input().split())

mod = 10**9+7

def combi(n,r):
    x, y = 1,1
    for i in range(n-r+1,n+1):
        x *= i
        x %= mod
        
    for j in range(1,r+1):
        y *= j
        y %= mod
    yinv = pow(y,mod-2,mod)
    
    return x*yinv%mod

def main():
    nca = combi(n,a)
    ncb = combi(n,b)
    ans = pow(2,n,mod)-1 - (nca + ncb)
        
    print(ans%mod)
    
main()

n,a,b=map(int,input().split())
mod=10**9+7
ans=pow(2,n,mod)-1
a=min(a,n-a)
b=min(b,n-b)
c=min(a,b)
wk=1
for i in range(1,c+1):
  wk=wk*(n+1-i)*pow(i,mod-2,mod)%mod
ans-=wk
for i in range(c+1,max(a,b)+1):
  wk=wk*(n+1-i)*pow(i,mod-2,mod)%mod
ans-=wk
print(ans%mod)

# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict, namedtuple
import heapq
from math import sqrt, factorial, gcd, ceil, atan, pi
def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline()[:-1] # warning bytes
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8').strip()
import string
import operator
import random
# string.ascii_lowercase
from bisect import bisect_left, bisect_right
from functools import lru_cache, reduce
MOD = int(1e9)+7
INF = float('inf')

def print_lines(data):
    sys.stdout.write('\n'.join((str(x) for x in data)))


def solve():
    N, a, b = [int(x) for x in input().split()]

    def prod(a, b):
        ans = 1
        for x in range(a, b + 1):
            ans *= x
            ans %= MOD
        return ans

    def fact(x):
        ans = 1
        while x:
            ans *= x
            ans %= MOD
            x -= 1
        return ans
 
    def coef(n, k):
        if k > n: return 0
        return (prod(n - k + 1, n) * pow(fact(k)%MOD, MOD - 2, MOD)) % MOD
 
    print(((MOD + pow(2, N, MOD) - 1 - coef(N, a) - coef(N, b)) % MOD))


T = 1
# T = int(input())
for case in range(1,T+1):
    ans = solve()


"""




"""


def main():
    #input data
    import sys
    input = lambda:sys.stdin.readline().strip()
    
    N,A,B = map(int,input().split())
    mod=10**9+7
    #solve
    #二項係数の和=2**n
    #2**n-1-nCa-nCb
    def modinv(a, mod=10**9+7):
        return pow(a, mod-2, mod)
    def cmb(n, r, mod=10**9+7):
        r = min(r, n-r)
        res = 1
        for i in range(r):
            res = res * (n - i) * modinv(i+1, mod) % mod
        return res
                
    ans = pow(2,N,mod)-1-cmb(N,A,mod)-cmb(N,B,mod)
    print(ans%mod)

def __starting_point():
    main()
__starting_point()

def Li():
    return list(map(int, input().split()))


n, a, b = Li()
mod = pow(10, 9)+7
bunshi = 1
bunbo = 1
ans = pow(2, n, mod)-1
for i in range(a):
    bunshi = (bunshi*(n-i)) % mod
    bunbo = (bunbo*(i+1)) % mod
ans = (ans-bunshi*pow(bunbo, -1, mod)) % mod
for i in range(a, b):
    bunshi = (bunshi*(n-i)) % mod
    bunbo = (bunbo*(i+1)) % mod
ans = (ans-bunshi*pow(bunbo, -1, mod)) % mod
print(ans)


ip = input().split(" ")
n = int(ip[0])
a = int(ip[1])
b = int(ip[2])

m = 1000000007


def modMul(a, b, mod):
    return (a*b)%mod
    

def fastExp(b, exp, mod):
    res = 1
    base = b
    while exp > 0:
        if exp%2 == 1:
            res = modMul(res, base, mod)
        base = modMul(base, base, mod)
        exp >>= 1
    return res


def getncr(n, r, m):
    num = 1
    fact = 1
    for i in range(r):
        num = modMul(num, n-i, m)
        fact = modMul(i+1, fact, m)
    return modMul(num, fastExp(fact, m-2, m) , m)
    
    
def solve(n, a, b, m):
    got = fastExp(2, n, m) -1
    for_a = getncr(n, a, m)
    for_b = getncr(n, b, m)
    got -= for_a
    if got < 0:
        got += m
    got -= for_b
    if got < 0:
        got += m
    print(got)

solve(n, a, b, m)



N,A,B=map(int,input().split())
M=10**9+7

def cmb(N,R,M):
    C=[1]*(R+1)
    for i in range(1,R+1):
        C[i]=(C[i-1]*(N+1-i)*pow(i,M-2,M))%M
    return C

C=cmb(N,B,M)
ans=pow(2,N,M)-1
ans-=C[A]+C[B]
print(ans%M)

n, a, b = map(int, input().split())

mod = 10**9 + 7

def nck(k):
    y, z = 1, 1
    for i in range(1, k+1):
        y = (y * (n+1-i)) % mod
        z = (z * pow(i, mod-2, mod)) % mod
    return (y*z) % mod

ans = (pow(2, n, mod) - 1 - nck(a) - nck(b)) % mod
print(ans)

n, a, b = map(int, input().split())
mod = 10**9 + 7
def cmb(n,r):
    p,q = 1,1
    for i in range(r):
        p = p*(n-i)%mod
        q = q*(i+1)%mod
    return p * pow(q,mod-2,mod) % mod
ALL = pow(2, n, mod) - 1
print((ALL - cmb(n, a) - cmb(n, b)) % mod)

n, a, b = map(int, input().split())
mod = 10**9 + 7
def nck(k):
    y, z = 1, 1
    for i in range(1, k+1):
        y = (y * (n+1-i)) % mod
        z = (z * pow(i, mod-2, mod)) % mod
    return (y*z) % mod
 
ans = (pow(2, n, mod) - 1 - nck(a) - nck(b)) % mod
print(ans)