CodeEff/ECCO huggingface dataset:
# Original solution
from functools import reduce
n, a, b = list(map(int, input().split()))
mod = 10**9 + 7

def f(A):
    bunsi = reduce(lambda x, y: x*y%mod, list(range(n, n-A, -1)))
    bunbo = reduce(lambda x, y: x*y%mod, list(range(1, A+1)))
    return bunsi * pow(bunbo, mod-2, mod) % mod

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

# Optimized solution
from functools import reduce
n, a, b = list(map(int, input().split()))
mod = 10**9 + 7

def comb(N, A, MOD):
    num = reduce(lambda x, y: x * y % MOD, list(range(N, N - A, -1)))
    den = reduce(lambda x, y: x * y % MOD, list(range(1, A + 1)))
    return num * pow(den, MOD - 2, MOD) % MOD

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

n, a, b = list(map(int, input().split()))
MOD = 10**9 + 7
print(((pow(2, n, MOD) - cmb(n, a, MOD) - cmb(n, b, MOD) - 1) % MOD))

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

def comb(n,r):
    P=1
    R=1
    for i in range(r):
        P=P*(n-i)%mod
        R=R*(r-i)%mod
    return P*pow(R,mod-2,mod)%mod

combN=pow(2,n,mod)-1
print(((combN-comb(n,a)-comb(n,b))%mod))
# Original solution
N, A, B = list(map(int, open(0).read().split()))

MOD = 10 ** 9 + 7

def comb(n, k):
    ret = 1
    for i in range(1, k + 1):
        ret = ret * (n - i + 1) % MOD        
        ret = ret * pow(i, MOD - 2, MOD) % MOD

    return ret

print(((pow(2, N, MOD) - 1 - comb(N, A) - comb(N, B)) % MOD))


# Optimized solution

N, A, B = list(map(int, input().split()))

MAX = 2 * 10 ** 5 + 1
MOD = 10 ** 9 + 7

# Factorial
fac = [0] * (MAX + 1)
fac[0] = 1
fac[1] = 1

# Inverse
inv = [0] * (MAX + 1)
inv[1] = 1

# Inverse factorial
finv = [0] * (MAX + 1)
finv[0] = 1
finv[1] = 1

for i in range(2, MAX + 1):
    fac[i] = fac[i - 1] * i % MOD
    inv[i] = MOD - inv[MOD % i] * (MOD // i) % MOD
    finv[i] = finv[i - 1] * inv[i] % MOD

# Factorial for large
facl = [0] * (MAX + 1)
facl[0] = N
for i in range(1, MAX + 1):
    facl[i] = facl[i - 1] * (N - i) % MOD

# Solution
ans = pow(2, N, MOD) - 1
ans -= facl[A - 1] * finv[A] % MOD
ans %= MOD
ans -= facl[B - 1] * finv[B] % MOD
ans %= MOD
print(ans)
# Original solution
def main():
    from math import factorial
    n, a, b = list(map(int, input().split()))
    p = 1000000007

    # 1:花束の組み合わせ総数の(mod p)
    n_all = pow(2, n, p) -1

    # 2:aとbの組み合わせ数の(mod p)を出す。
    a_comb = 0      # aの組み合わせ数
    a_comb_x = 1    # aの組み合わせ数計算の分子。n*(n-1)*…*(n-r+1)のmod p
    a_comb_y = 1    # aの組み合わせ数計算の分母。r!のmod pにおける逆元
    for i in range(n, n-a ,-1):
        a_comb_x *= i
        a_comb_x %= p
    a_comb_y = factorial(a)
    a_comb_y = pow(a_comb_y, p-2,p)
    a_comb = (a_comb_x * a_comb_y) % p

    b_comb = 0      
    b_comb_x = 1    
    b_comb_y = 1    
    for i in range(n, n-b ,-1):
        b_comb_x *= i
        b_comb_x %= p
    b_comb_y = factorial(b)
    b_comb_y = pow(b_comb_y, p-2,p)
    b_comb = (b_comb_x * b_comb_y) % p

    # 3: 1の結果から２のそれをマイナスする。結果が負になったら+p
    r = n_all - a_comb
    if r < 0:
        r += p
    r -= b_comb
    if r < 0:
        r += p
    print(r)

main()

# Optimized solution
def main():
    n, a, b = list(map(int, input().split()))
    p = 10 ** 9 + 7
    r = pow(2, n, p) - 1
    if (n - a) < a:
        a = n - a
    if (n - b) < b:
        b = n - b
    fac_na = 1
    for i1 in range(n, n - a, -1):
        fac_na = (fac_na * i1) % p
    fac_nb = 1
    for i1 in range(n, n - b, -1):
        fac_nb = (fac_nb * i1) % p
    fac_a = 1
    for i1 in range(1, a+1):
        fac_a = (fac_a * i1) % p
    fac_b = 1
    for i1 in range(1, b+1):
        fac_b = (fac_b * i1) % p

    an = fac_na * pow(fac_a, p-2, p)
    bn = fac_nb * pow(fac_b, p-2, p)
    an = an % p
    bn = bn % p
    r -= an
    if r < 0:
        r += p
    r -= bn
    if r < 0:
        r += p
    if r < 0:
        r += p
    print((int(r)))


if __name__ == '__main__':
    main()
# Original solution
def loop_pow(x,n,mod):
    if n==0:
        return 1
    if n%2==0:
        t=loop_pow(x,n//2,mod)
        return (t*t)%mod
    return x*loop_pow(x,n-1,mod)%mod

def com(N,K,mod):
    n=N
    k=K
    up=1
    down=1
    for _ in range(K):
        up*=n
        up%=mod
        n-=1
    for _ in range(K):
        down*=k
        down%=mod
        k-=1
    down=loop_pow(down,10**9+5,mod)
    return up*down%mod

def main():
    N,a,b=list(map(int,input().split()))
    mod=10**9+7
    t=(loop_pow(2,N,mod)-1-com(N,a,mod)-com(N,b,mod))%mod
    print(t)

if __name__=="__main__":
    main()

# Optimized solution
def com(N,K,mod):
    n=N
    k=K
    X=1  #分子
    Y=1  #分母
    for _ in range(K):
        X*=n
        X%=mod
        n-=1
    for _ in range(K):
        Y*=k
        Y%=mod
        k-=1
    Y=pow(Y,mod-2,mod)  #Y**(mod-2) mod(mod)
    return X*Y%mod  #nCk mod(mod)

def main():
    N,a,b=list(map(int,input().split()))
    mod=1000000007
    t=(pow(2,N,mod)-1-com(N,a,mod)-com(N,b,mod))%mod
    print(t)
    
if __name__=="__main__":
    main()
# Original solution
n,a,b=list(map(int,input().split()));k=1000000007
c=(1<<n)%k-1

X=1
for i in range(a):X=X*(n-i)%k
Y=j=1
while j<=a:Y=Y*j%k;j+=1
#Z=Y**(k-2)を計算，ビットワイズによる繰り返し２乗法の実装。
d=k-2;Z=1
while d>0:
  Z=Z*Y%k if d&1==1 else Z
  Y=Y*Y%k;d>>=1 #一周する度にY, Y^2, Y^4, Y^8となる; dのビット桁をずらす
c-=X*Z%k

X=1
for i in range(b):X=X*(n-i)%k
Y=j=1
while j<=b:Y=Y*j%k;j+=1
d=k-2;Z=1
while d>0:
  Z=Z*Y%k if d&1==1 else Z
  Y=Y*Y%k;d>>=1
c-=X*Z%k

print((c%k))

# Optimized solution
n,*a=list(map(int,open(0).read().split()));k=1000000007
c=(1<<n)%k-1
for l in a:
	X=Y=j=Z=1;d=k-2
	for i in range(l):X=X*(n-i)%k
	while j<=l:Y=Y*j%k;j+=1
	while d>0:Z=Z*Y%k if d&1==1 else Z;Y=Y*Y%k;d>>=1
	c-=X*Z%k
print((c%k))
# Original solution
n,*a=list(map(int,open(0).read().split()));k=10**9+7
c=(1<<n)%k-1
for l in a:
	X=Y=j=Z=1;d=k-2
	for i in range(l):X=X*(n-i)%k
	while j<=l:Y=Y*j%k;j+=1
	while d>0:Z=Z*Y%k if d&1==1 else Z;Y=Y*Y%k;d>>=1
	c-=X*Z%k
print((c%k))

# Optimized solution
n,*A=list(map(int,open(0).read().split()));k=10**9+7
c=(1<<n)%k-1
for l in A:
	X=Y=1
	for i in range(l):X=X*(n-i)%k;Y=Y*(i+1)%k
	c-=X*pow(Y,k-2,k)
print((c%k))
# Original solution
n,*A=list(map(int,open(0).read().split()));k=10**9+7
c=(1<<n)%k-1
for l in A:
	X=Y=1
	for i in range(l):X=X*(n-i)%k;Y=Y*(i+1)%k
	c-=X*pow(Y,k-2,k)
print((c%k))

# Optimized solution
n,a,b=list(map(int,input().split()));k=10**9+7;c=(1<<n)%k-1;X=Y=1
for i in range(b):X=X*(n-i)%k;Y=Y*(i+1)%k;c-=X*pow(Y,k-2,k)if i+1 in(a,b) else 0
print((c%k))
# Original solution
n,a,b=list(map(int,input().split()));k=10**9+7;c=(1<<n)%k-1;X=Y=1
for i in range(b):X=X*(n-i)%k;Y=Y*(i+1)%k;c-=X*pow(Y,k-2,k)if i+1 in(a,b) else 0
print((c%k))

# Optimized solution
n,a,b=list(map(int,input().split()));k=10**9+7
c=(1<<n)%k-1
X=Y=1
for i in range(b):
	X=X*(n-i)%k;Y=Y*(i+1)%k
	if i+1 in(a,b):c-=X*pow(Y,k-2,k)
print((c%k))
# Original solution
from functools import reduce

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

mod=10**9+7
def nCk(n,k):
  c=reduce(lambda x,y: x*y%mod, list(range(n,n-k,-1)))
  m=reduce(lambda x,y: x*y%mod, list(range(1,k+1)))
  return c*pow(m,mod-2,mod)%mod

all=pow(2,n,mod)
nCa=nCk(n,a)
nCb=nCk(n,b)

print(((all-nCa-nCb-1)%mod))

# Optimized solution
from functools import reduce

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

mod=10**9+7
def nCk(n,k):
    if n<k or (n<0 or k<0):
        return 0
    k=min(k,n-k)
    up,down=1,1
    for i in range(k):
        up=up*(n-i)%mod
        down=down*(i+1)%mod
    return up*pow(down,mod-2,mod)%mod

all=pow(2,n,mod)
nCa=nCk(n,a)
nCb=nCk(n,b)

print(((all-nCa-nCb-1)%mod))
# Original solution
#!/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))


# Optimized solution
#!/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))
# Original solution
n,a,b = list(map(int,input().split()))

mod = 10 ** 9 + 7
k = max(a,b)
com = [1]

for i in range(1,k+1):
    com.append((com[i-1]*(n-i+1)*pow(i,mod-2,mod))%mod)

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

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

def nCr(n,r):
    if r*2>n:
        return nCr(n,n-r)
    else:
        a = b = 1
        for i in range(r):
            a = a * (n - i) % mod
            b = b * (r - i) % mod
        return (a * pow(b,mod-2,mod)) % mod

ans = pow(2,n,mod) - 1 - nCr(n,a) - nCr(n,b)
print((ans%mod))
# Original solution
n,a,b=list(map(int,input().split()))
MOD=10**9+7
def inv(a):
  return pow(a,MOD-2,MOD)

def choose(n,r):
  if r==0 or r==n:
    return 1
  else:
    A=B=1
    ls_A=[1]
    ls_B=[1]
    for i in range(r):
      A=ls_A[i]*(n-i)%MOD
      ls_A.append(A)
      B=ls_B[i]*(i+1)%MOD
      ls_B.append(B)
    return ls_A[r]*inv(ls_B[r])%MOD

def pow_k(x,n):
    if n==0:
        return 1
    K=1
    while n>1:
        if n%2 != 0:
            K=K*x%MOD
            x=x**2%MOD
            n=(n-1)//2
        else:
            x=x**2%MOD
            n=n//2%MOD
    return K*x%MOD 

print(((pow_k(2,n)-1-choose(n,a)-choose(n,b))%MOD))

# Optimized solution
n,a,b=list(map(int,input().split()))
MOD=10**9+7
def inv(a):
  return pow(a,MOD-2,MOD)
def choose(n,r):
  if r==0 or r==n:
    return 1
  else:
    A=B=1
    for i in range(r):
      A=A*(n-i)%MOD
      B=B*(i+1)%MOD
    return A*inv(B)%MOD
print(((pow(2,n,MOD)-1-choose(n,a)-choose(n,b))%MOD))
# Original solution
p = 10 ** 9 + 7
n,a,b = list(map(int,input().split()))
k=max(a,b)
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)
com=[0]*(k+1)
com[0]=1
for i in range(1, k+1):
  com[i]=((com[i-1]*(n-i+1))*modinv(i,p))%p
print(((pow(2,n,p)-1-com[a]-com[b])%p))


# Optimized solution
p = 10 ** 9 + 7
n,a,b = list(map(int,input().split()))
k=max(a,b)
def nCr(n, r, mod):
  ret = [1]*(r+1)
  for i in range(1, r+1):
    ret[i] = (ret[i-1] * (n-i+1) * pow(i,mod-2,mod)) % mod
  return ret
nCrl = nCr(n, k, p)
print(((pow(2,n,p)-1-nCrl[a]-nCrl[b])%p))
# Original solution
def comb(n,r):
    if n-r < r:
        r=n-r
    p=1
    q=1
    for i in range(r):
        p *=n-i #=n(n-1)・・(n-r+1)
        p %= mod
        q *=i+1 #=1・2・・r =r!
        q %=mod
    return p*pow(q,mod-2,mod)

# 初期入力
N,a,b = (int(x) for x in input().split())
mod =10**9 +7
#
all_n =pow(2,N,mod) -1

#嫌いな数の組み合わせ
dislike_a =comb(N,a)
dislike_b =comb(N,b)

ans = (all_n -dislike_a -dislike_b)%mod
print(ans)

# Optimized solution

# 組み合わせの総数 p=10**9+7 で割ったあまりを求める 
"""n<10**9 ,r<10**7  ,p は素数"""
def comb(n,r):
    if n-r < r:
        r=n-r
    p=1
    q=1
    for i in range(r):
        p *=n-i #=n(n-1)・・(n-r+1)
        p %= mod
        q *=i+1 #=1・2・・r =r!
        q %=mod
    return p*pow(q,mod-2,mod)


# 初期入力
N,a,b = (int(x) for x in input().split())
mod =10**9 +7

#N種類の花1本以上の組み合わせ全て(0本選ぶは×なので-1)
all = pow(2,N,mod)-1

#嫌いな本数の組み合わせ
comb_a =comb(N,a)
comb_b =comb(N,b)

ans =(all -comb_a -comb_b)% mod
print(ans)
# Original solution
n, a, b = list(map(int, input().split()))

mod = 10**9 + 7

import time
start = time.time()


# x ** a をmodで割った余りを、O(log(a))時間で求める。
def power(x, a):
	if a == 0:
		return 1
	elif a == 1:
		return x
	elif a % 2 == 0:
		return power(x, a//2) **2 % mod
	else:
		return power(x, a//2) **2 * x % mod

# xの逆元を求める。フェルマーの小定理より、 x の逆元は x ^ (mod - 2) に等しい。計算時間はO(log(mod))程度。
# https://qiita.com/Yaruki00/items/fd1fc269ff7fe40d09a6
def modinv(x):
	return power(x, mod-2)

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

end = time.time()
# print("time: ", end - start)

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

# (2 ** n - 1) - nCa - nCb
ans = power(2, n) - 1

ans -= (binomial_coefficients2(n, a) + binomial_coefficients2(n, b))
print((ans % mod))


# print(binomial_coefficients2 (5, 2) % mod)


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

mod = 10**9 + 7

import time
start = time.time()


# x ** a をmodで割った余りを、O(log(a))時間で求める。
def power(x, a):
	if a == 0:
		return 1
	elif a == 1:
		return x
	elif a % 2 == 0:
		return power(x, a//2) **2 % mod
	else:
		return power(x, a//2) **2 * x % mod

# xの逆元を求める。フェルマーの小定理より、 x の逆元は x ^ (mod - 2) に等しい。計算時間はO(log(mod))程度。
# https://qiita.com/Yaruki00/items/fd1fc269ff7fe40d09a6
def modinv(x):
	return pow(x, mod-2, mod)

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

end = time.time()
# print("time: ", end - start)

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

# (2 ** n - 1) - nCa - nCb
ans = power(2, n) - 1

ans -= (binomial_coefficients2(n, a) + binomial_coefficients2(n, b))
print((ans % mod))


# print(binomial_coefficients2 (5, 2) % mod)
# Original solution
n,a,b=list(map(int,input().split()))

c=10**9+7

nca=1
ncb=1

for i in range(a):
    nca*=(n-i)*pow(i+1,c-2,c)
    nca%=c

for i in range(b):
    ncb*=(n-i)*pow(i+1,c-2,c)
    ncb%=c

ans=pow(2,n,c)-1-(nca+ncb)

ans%=c

print(ans)

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

c=10**9+7

def com(n,k,c):
    l=1
    m=1
    for i in range(k):
        l*=n-i
        m*=i+1
        l%=c
        m%=c
    return l*pow(m,c-2,c)%c

ans=pow(2,n,c)-1-com(n,a,c)-com(n,b,c)

ans%=c

print(ans)
# Original solution
n, a, b = list(map(int, input().split()))
mod = 10**9+7

def cmb2(n, r, mod):
    res = 1
    for k in range(1, r+1):
        res *= (n-k+1)*pow(k,(mod-2),mod)%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)

# Optimized solution
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)
# Original solution
mod = 1000000007

# 繰り返し二乗法  
def mod_pow(a, n, p):
    if n == 1:
        return a % p
    if n % 2 == 1:
        return (a* mod_pow(a, n - 1, p)) % p
    tmp = mod_pow(a, n / 2, p)
    return ( tmp * tmp ) % p

# 組み合わせ
def mod_cmb(n, k, p):
    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 * mod_pow(d, p - 2, p) % p

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

    ans = mod_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))

if __name__ == '__main__':
    main()

# Optimized solution
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))

if __name__ == '__main__':
    main()
# Original solution
Q = 10**9+7

def getInv(N):
    inv = [0] * (N + 1)
    inv[1] = 1
    for i in range(2, N + 1):
        inv[i] = (-(Q // i) * inv[Q % i]) % Q
    return inv

def main():

    n, a, b = list(map( int, input().split()))
    Inv = getInv(2*10**5)
    def cmb(n,r):
        ret = 1
        for i in range(r):
            ret *= n-i
            ret %= Q
            ret *= Inv[i+1]
            ret %= Q
        return ret
    print(( (pow(2,n,Q) - cmb(n,a) - cmb(n,b)-1)%Q))
if __name__ == '__main__':
    main()

# Optimized solution
Q = 10**9+7

def cmb(n,r):
    if n-r < r: r = n-r
    if r == 0: return 1
    denominator = 1                       #分母
    numerator = 1                         #分子
    for i in range(r):
        numerator *= n-i
        numerator %= Q
        denominator *= i+1
        denominator %= Q
    return numerator*pow(denominator, Q-2, Q)%Q

def main():
    n, a, b = list(map( int, input().split()))
    print(( (pow(2,n,Q) - cmb(n,a) - cmb(n,b)-1)%Q))
if __name__ == '__main__':
    main()
# Original solution
def pow(a,b,c):
    ans = 1
    while b > 0:
        if b & 1:
            ans = ans*a % c
        a = a*a % c
        b = b >> 1
    return 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,c-2,c) % c
mod = 10**9+7
n,a,b = list(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)

# Optimized solution
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 = list(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)
# Original solution
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 = list(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)

# Optimized solution
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,c-2,c) % c
mod = 10**9+7
n,a,b = list(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)
# Original solution
n,a,b=list(map(int,input().split()))
mod=10**9+7
c,d=1,1
for i in range(n-a+1,n+1):
    c=i*c%mod
for i in range(1,a+1):
    c=c*pow(i,mod-2,mod)%mod
for i in range(n-b+1,n+1):
    d=i*d%mod
for i in range(1,b+1):
    d=d*pow(i,mod-2,mod)%mod
print(((pow(2,n,mod)-c-d-1)%mod))

# Optimized solution
def main():
    n,a,b=list(map(int,input().split()))
    mod=10**9+7
    c,d=1,1
    for i in range(n-a+1,n+1):
        c=i*c%mod
    for i in range(1,a+1):
        c=c*pow(i,mod-2,mod)%mod
    for i in range(n-b+1,n+1):
        d=i*d%mod
    for i in range(1,b+1):
        d=d*pow(i,mod-2,mod)%mod
    print(((pow(2,n,mod)-c-d-1)%mod))
main()
# Original solution
n, a, b = list(map(int, input().split()))

P = 10 ** 9 + 7


def conb(n, r):
    resp = n
    for i in range(1, r):
        resp = (resp * (n - i) * pow(i + 1, P - 2))%P
    return resp


def pow(x, n):
    ans = 1
    while (n > 0):
        if (bin(n & 1) == bin(1)):
            ans = (ans * x)%P
        x = (x * x) % P
        n = n >> 1  # ビットシフト
    return ans



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


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

P = 10 ** 9 + 7


def conb(n, r):
    P = 10 ** 9 + 7
    x = 1
    y = 1
    for i in range(n - r + 1, n + 1):
        x = (x * i % P)
    for i in range(1, r + 1):
        y = (y * i % P)
    y_inv = pow(y, P - 2)
    return x * y_inv


def pow(x, n):
    ans = 1
    while (n > 0):
        if (bin(n & 1) == bin(1)):
            ans = (ans * x) % P
        x = (x * x) % P
        n = n >> 1  # ビットシフト
    return ans


print(((pow(2, n) - conb(n, a) - conb(n, b) - 1) % P))
# Original solution
def cmb(n, r, p):
    # ex. 5_C_4 = 5_C_1、rが小さい方を計算したほうが楽
    r = min(r, n - r)

    # n*(n-1)*...*(n-r+1)
    # 組み合わせの公式の分子
    upper = 1
    for i in range(n, n - r, -1):
        upper = (upper * i) % p

    # 1*2*...*r
    # 組み合わせの公式の分母
    lower = 1
    for i in range(1, r + 1):
        lower = (lower * i) % p
    # 剰余の計算において、+-*は良いが、/は普通にやると成り立たない
    # ex. 6/3(mod5)...2になって欲しいが1/3になってしまう
    # 割るのではなく、「逆元」を掛けるとすれば割らなくて済む
    # フェルマーの小定理より、pが素数なら1/lowerの逆元はlower**(p-2)
    # powの第3引数を使うことで繰り返し二乗法になる
    return (upper * pow(lower, p - 2, p)) % p

mod = pow(10, 9) + 7
n, a, b = list(map(int, input().split()))
# 全ての選び方-何も選ばない時-a本の時-b本の時
ans = (pow(2, n, mod) - 1 - cmb(n, a, mod) - cmb(n, b, mod)) % mod
print(ans)


# Optimized solution
def cmb(n, r, p):
    r = min(r, n - r)

    # n*(n-1)*...*(n-r+1)
    # 組み合わせの分子
    upper = 1
    for i in range(n, n - r, -1):
        upper = (upper * i) % p

    # 1*2*...*r
    # 組み合わせの分母
    lower = 1
    for i in range(1, r + 1):
        lower = (lower * i) % p
    # 剰余の計算において、+-*は良いが、/は普通にやると成り立たない
    # 割るのではなく、「逆元」を掛けるとする
    # フェルマーの小定理より、pが素数なら1/lowerの逆元はlower**(p-2)
    # powの第3引数を使うことで繰り返し二乗法になる
    return (upper * pow(lower, p - 2, p)) % p


mod = pow(10, 9) + 7
n, a, b = list(map(int, input().split()))
# 全ての選び方-何も選ばない時-a本の時-b本の時
ans = (pow(2, n, mod) - 1 - cmb(n, a, mod) - cmb(n, b, mod)) % mod
print(ans)
# Original solution
MOD = 10**9 + 7

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

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

# invs[x]: xの逆元 (x:0～n)
def getInvs(n, MOD):
    invs = [1] * (n+1)
    for x in range(2, n+1):
        invs[x] = (-(MOD//x) * invs[MOD%x]) % MOD
    return invs

invs = getInvs(2*10**5, MOD)

def f(n, k):
    num = 1
    for i in range(n-k+1, n+1):
        num *= i
        num %= MOD
    for i in range(k+1):
        num *= invs[i]
        num %= MOD
    return num

numA = f(n, a)
numB = f(n, b)
#print('numA:', numA, '/ numB:', numB)

print(((ans - numA - numB) % MOD))


# Optimized solution
MOD = 10**9 + 7

N, A, B = list(map(int, input().split()))

def getComb(n, k, MOD):
    if n < k:
        return 0
    if n-k < k:
        k = n-k
    comb = 1
    for x in range(n-k+1, n+1):
        comb = (comb * x) % MOD
    d = 1
    for x in range(1, k+1):
        d = (d * x) % MOD
    comb *= pow(d, MOD-2, MOD)
    return comb % MOD

ans = pow(2, N, MOD) - 1
ans -= getComb(N, A, MOD)
ans -= getComb(N, B, MOD)
ans %= MOD

print(ans)
# Original solution
def main():
    n,a,b = list(map(int,input().split()))
    MOD = 10**9 +7
    s = pow(2,n,MOD)-1
    P_ni = 1
    F_i = 1

    s = s - comb_mod(n,a,MOD)
    s = s - comb_mod(n,b,MOD)

    print((s%MOD))

def comb_mod(n, k, mod):
    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


if __name__=='__main__':
    main()


# Optimized solution
def main():
    n,a,b = list(map(int,input().split()))
    MOD = 10**9 +7
    s = pow(2,n,MOD)-1
    
    print((comb_mod(n,MOD,a,b,s)))

def comb_mod(n, mod,a,b,s):
    numerator = 1
    denominator = 1
    for i in range(b):
        numerator = (numerator * (n - i)) % mod
        denominator = (denominator * (i + 1)) % mod
        if i == a-1 or i == b-1:
            s = s - (numerator * pow(denominator, mod - 2, mod)) % mod
    return s%mod


if __name__=='__main__':
    main()