CodeEff/ECCO huggingface dataset:
# Original solution
MOD = 10**9 + 7
def comb(n, k, MOD):
    if n < k or n < 0 or k < 0:
        return 0
    if k == 0:
        return 1
    iinv = [1] * (k + 1)
    ans = n
    for i in range(2, k + 1):
        iinv[i] = MOD - iinv[MOD % i] * (MOD // i) % MOD
        ans *= (n + 1 - i) * iinv[i] % MOD
        ans %= MOD
    return ans
n, a, b = list(map(int, input().split()))
print(((pow(2,n,MOD)-1-comb(n,a,MOD)-comb(n,b,MOD)+MOD*10)%MOD))

# Optimized solution
MOD = 10**9 + 7
def comb(n, k, MOD):
    if n < k or n < 0 or k < 0:
        return 0
    if k == 0:
        return 1
    iinv = [1] * (k + 1)
    ans = n
    for i in range(2, k + 1):
        iinv[i] = MOD - iinv[MOD % i] * (MOD // i) % MOD
        ans *= (n + 1 - i) * iinv[i] % MOD
        ans %= MOD
    return ans
n, a, b = list(map(int, input().split()))
ans = pow(2,n,MOD)
print((((ans-comb(n,a,MOD))%MOD-comb(n,b,MOD))%MOD-1))
# Original solution
n, a, b = list(map(int, input().split()))


def modpow(a, b, mod=10 ** 9 + 7):
    ret = 1
    while b > 0:
        if b % 2 == 1:
            ret = ret * a % mod
        a = a * a % mod
        b //= 2
    return ret


def modcomb(n, c, mod=10 ** 9 + 7):
    if c > n - c:
        c = n - c
    u, d = 1, 1
    for i in range(c):
        u = u * (n - i) % mod
        d = d * (i + 1) % mod
    return u * modpow(d, mod - 2) % mod


print(((modpow(2, n) - modcomb(n, a) - modcomb(n, b)) % (10 ** 9 + 7) - 1))


# Optimized solution
def modpow(a, b, mod=10 ** 9 + 7):
    ret = 1
    while b > 0:
        if b % 2 == 1:
            ret = ret * a % mod
        a = a * a % mod
        b //= 2
    return ret


def modcomb(n, c, mod=10 ** 9 + 7):
    if c > n - c:
        c = n - c
    u, d = 1, 1
    for i in range(c):
        u = u * (n - i) % mod
        d = d * (i + 1) % mod
    return u * modpow(d, mod - 2) % mod


mod = 10 ** 9 + 7
n, a, b = list(map(int, input().split()))
ans = (modpow(2, n) - 1) % mod
ans = (ans - modcomb(n, a)) % mod
ans = (ans - modcomb(n, b)) % mod
print(ans)
# Original solution
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 %= M

    return result


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


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

print(((pow(2, N) - cmb(N, a)-cmb(N, b)-1) % M))


# Optimized solution
def cmb(n, r, mod):
    p, q = 1, 1
    for i in range(r):
        p *= n - i
        p %= mod
        q *= i + 1
        q %= mod
    # 1/q!の逆元をかける(= q! ^ (mod-2) % mod)
    return p * pow(q, mod - 2, mod)


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))
# Original solution
import math

# xのn乗
def pow_k(x, n):
    """
    O(log n)
    """
    if n == 0:
        return 1

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

    return K * x

# nCkの導出
def comb(n,k):
    nCk = 1
    # X
    for i in range(n-k+1, n+1):
        nCk *= i
        nCk %= mod

    # Y
    for i in range(1,k+1):
        nCk *= pow(i,mod-2,mod)
        nCk %= mod
    return nCk

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

# ans = pow_k(2,n) - c(n,a) - c(n,b) - 1

ans = pow(2,n,mod) - 1 - comb(n,a) - comb(n,b)

print((ans%mod))

# Optimized solution
MOD = 10**9+7

def comb(n,k):
    nCk = 1
    # X
    for i in range(n-k+1, n+1):
        nCk *= i
        nCk %= MOD

    # Y
    for i in range(1,k+1):
        nCk *= pow(i,MOD-2,MOD)
        nCk %= MOD
    return nCk

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

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



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

# Optimized solution
from functools import reduce

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

def combination2(n, r, MOD=10**9+7):
    if not 0 <= r <= n: return 0
    r = min(r, n - r)
    numerator = reduce(lambda x, y: x * y % MOD, list(range(n, n - r, -1)), 1)
    denominator = reduce(lambda x, y: x * y % MOD, list(range(1, r + 1)), 1)
    return numerator * pow(denominator, MOD - 2, MOD) % MOD

print(((pow(2,n,MOD) - combination2(n,a) - combination2(n,b)-1)%MOD))
# Original solution
n,a,b = list(map(int,input().split()))
mod = 10**9+7
def pow(n, p,mod=10**9+7): #繰り返し二乗法(nのp乗)
    res = 1
    while p > 0:
        if p % 2 == 0:
            n = n ** 2 % mod
            p //= 2
        else:
            res = res * n % mod
            p -= 1
    return res % mod

def large_conbination(n,k,mod=10**9+7): #needs pow method. return nCk.
    res1 = 1
    for i in range(n,n-k,-1):
        res1*=i
        res1%=mod
    res2 = 1
    for i in range(1,k+1):
        res2*= pow(i,mod-2) #フェルマーの小定理を用いて分母を計算
        res2%=mod
    return res1*res2%mod

ans = pow(2,n) -1 

ans -= large_conbination(n,a)
ans -= large_conbination(n,b)

while ans<0:
    ans += mod
print((ans%mod))

# Optimized solution
n,a,b = list(map(int,input().split()))
mod = 10**9+7
def pow(n, p,mod=10**9+7): #繰り返し二乗法(nのp乗)
    res = 1
    while p > 0:
        if p % 2 == 0:
            n = n ** 2 % mod
            p //= 2
        else:
            res = res * n % mod
            p -= 1
    return res % mod

def large_conbination(n,k,mod=10**9+7): #needs pow method. return nCk.
    res1 = 1
    for i in range(n,n-k,-1):
        res1*=i
        res1%=mod
    res2 = 1
    for i in range(1,k+1):
        res2*= i
        res2%=mod
    return res1*pow(res2,mod-2)%mod

ans = pow(2,n) -1 

ans -= large_conbination(n,a)
ans -= large_conbination(n,b)

while ans<0:
    ans += mod
print((ans%mod))
# Original solution
import sys
import math
import fractions
import itertools
from collections import deque
import copy
import bisect

MOD = 10 ** 9 + 7
INF = 10 ** 18 + 7
input = lambda: sys.stdin.readline().strip()


def inv_mod(a, N):
    """
    Fermatの小定理より(Nが素数のときしか使えない)
    aの逆元 ax = 1 (mod N)を満たすx = a^(N-2) mod Nを返す。
    O(log N)
    """

    def bpm(x, y, N):
        """
         Bisection power method : 二分累乗法
         O(log y)でx^(y) mod N を求める。
        """
        ans = 1
        x %= MOD
        digit = int((math.log(y, 2) // 1 + 1))  # yの２進数表示の桁数
        for i in range(digit):
            if (y >> i) & 1 == 1:
                ans *= x
                ans %= MOD
            x **= 2
            x %= MOD
        return ans

    return bpm(a, N - 2, N)


def bpm(x, y, N):
    """
     Bisection power method : 二分累乗法
     O(log y)でx^(y) mod N を求める。
    """
    ans = 1
    x %= MOD
    digit = int((math.log(y, 2) // 1 + 1))  # yの２進数表示の桁数
    for i in range(digit):
        if (y >> i) & 1 == 1:
            ans *= x
            ans %= MOD
        x **= 2
        x %= MOD
    return ans


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

nCa = 1
nCb = 1

inv_list = []

for i in range(max(a, b)):
    inv_list.append(inv_mod(i + 1, MOD))

for i in range(a):
    nCa *= inv_list[i]
    nCa %= MOD
    nCa *= n - i
    nCa %= MOD

for i in range(b):
    nCb *= inv_list[i]
    nCb %= MOD
    nCb *= n - i
    nCb %= MOD

print(((bpm(2, n, MOD) - 1 - nCa - nCb) % MOD))


# Optimized solution
import sys
import math
import fractions
import itertools
from collections import deque
import copy
import bisect

MOD = 10 ** 9 + 7
INF = 10 ** 18 + 7
input = lambda: sys.stdin.readline().strip()


def inv_mod(a, N):
    """
    Fermatの小定理より(Nが素数のときしか使えない)
    aの逆元 ax = 1 (mod N)を満たすx = a^(N-2) mod Nを返す。
    O(log N)
    """

    def bpm(x, y, N):
        """
         Bisection power method : 二分累乗法
         O(log y)でx^(y) mod N を求める。
        """
        ans = 1
        x %= MOD
        digit = int((math.log(y, 2) // 1 + 1))  # yの２進数表示の桁数
        for i in range(digit):
            if (y >> i) & 1 == 1:
                ans *= x
                ans %= MOD
            x **= 2
            x %= MOD
        return ans

    return bpm(a, N - 2, N)


def bpm(x, y, N):
    """
     Bisection power method : 二分累乗法
     O(log y)でx^(y) mod N を求める。
    """
    ans = 1
    x %= MOD
    digit = int((math.log(y, 2) // 1 + 1))  # yの２進数表示の桁数
    for i in range(digit):
        if (y >> i) & 1 == 1:
            ans *= x
            ans %= MOD
        x **= 2
        x %= MOD
    return ans


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

nCa = 1
nCb = 1

inv_list = [1]  # 0で割るというのは定義されないので無視。
for i in range(max(a, b)):
    inv_list.append(int(MOD - inv_list[(MOD % (i + 2)) - 1] * (MOD // (i + 2)) % MOD))

for i in range(a):
    nCa *= inv_list[i]
    nCa %= MOD
    nCa *= n - i
    nCa %= MOD

for i in range(b):
    nCb *= inv_list[i]
    nCb %= MOD
    nCb *= n - i
    nCb %= MOD

print(((bpm(2, n, MOD) - 1 - nCa - nCb) % MOD))
# Original solution
import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
n, a, b = [int(x) for x in input().strip().split()]
mod = 10 ** 9 + 7
ans = pow(2, n, mod) - 1

fact = [1] * (b + 1)
for i in range(1, b+1):
    fact[i] = (fact[i-1] * i) % mod

inv = [1] * (b + 1)
inv[-1] = pow(fact[-1], mod-2, mod)
for i in range(1, b):
    inv[-1-i] = (inv[-1-i+1] * (b-(i-1))) % mod

def nCr(n, r):
    ret = 1
    for i in range(r):
        ret = (ret * (n - i) % mod) % mod
    return (ret * inv[r]) % mod

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

# Optimized solution
import sys
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
n, a, b = [int(x) for x in input().strip().split()]
mod = 10 ** 9 + 7
ans = pow(2, n, mod) - 1

num = 1
den = 1
for i in range(a):
    den = (den * (i+1)) % mod
    num = (num * (n-i)) % mod
ans = (ans - (num * pow(den, mod-2, mod)) % mod ) % mod

for i in range(a, b):
    den = (den * (i+1)) % mod
    num = (num * (n-i)) % mod
ans = (ans - (num * pow(den, mod-2, mod)) % mod ) % mod

print(ans)
# 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
class Factorial():
    def __init__(self, mod=10**9 + 7):
        self.mod = mod
        self._factorial = [1]
        self._size = 1
        self._factorial_inv = [1]
        self._size_inv = 1

    def __call__(self, n):
        return self.fact(n)

    def fact(self, n):
        ''' n! % mod '''
        if n >= self.mod:
            return 0
        self._make(n)
        return self._factorial[n]
    
    def _make(self, n):
        if n >= self.mod:
            n = self.mod
        if self._size < n+1:
            for i in range(self._size, n+1):
                self._factorial.append(self._factorial[i-1]*i % self.mod)
            self._size = n+1

    def fact_inv(self, n):
        ''' n!^-1 % mod '''
        if n >= self.mod:
            raise ValueError('Modinv is not exist! arg={}'.format(n))
        self._make(n)
        if self._size_inv < n+1:
            self._factorial_inv += [-1] * (n+1-self._size_inv)
            self._size_inv = n+1
        if self._factorial_inv[n] == -1:
            self._factorial_inv[n] = self.modinv(self._factorial[n])
        return self._factorial_inv[n]
    
    @staticmethod
    def xgcd(a, b):
        '''
        Return (gcd(a, b), x, y) such that a*x + b*y = gcd(a, b)
        '''
        x0, x1, y0, y1 = 0, 1, 1, 0
        while a != 0:
            (q, a), b = divmod(b, a), a
            y0, y1 = y1, y0 - q * y1
            x0, x1 = x1, x0 - q * x1
        return b, x0, y0

    def modinv(self, n):
        g, x, _ = self.xgcd(n, self.mod)
        if g != 1:
            raise ValueError('Modinv is not exist! arg={}'.format(n))
        return x % self.mod

    def comb(self, n, r):
        ''' nCr % mod '''
        if r > n:
            return 0
        t = self(n)*self.fact_inv(n-r) % self.mod
        return t*self.fact_inv(r) % self.mod
    
    def comb_(self, n, r):
        '''
        nCr % mod
        when r is not large and n is too large
        '''
        c = 1
        for i in range(1, r+1):
            c *= (n-i+1) * self.modinv(i)
            c %= self.mod
        return c

    def comb_with_repetition(self, n, r):
        ''' nHr % mod '''
        t = self(n+r-1)*self.fact_inv(n-1) % self.mod
        return t*self.fact_inv(r) % self.mod

    def perm(self, n, r):
        ''' nPr % mod '''
        if r > n:
            return 0
        return self(n)*self.fact_inv(n-r) % self.mod

mod = 10**9 + 7
n, a, b = list(map(int, input().split()))
comb = Factorial().comb_
print(((pow(2, n, mod) - comb(n, a) - comb(n, b) - 1) % mod))
# Original solution
from math import factorial


def modpow(a, n, p):
    if n == 0:
        return 1
    elif n == 1:
        return a % p
    if n % 2 == 1:
        return (a * modpow(a, n-1, p)) % p
    tmp = modpow(a, n//2, p)
    return (tmp * tmp) % p


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

    # まずは繰り返し2乗法によって全部の組み合わせを求める
    # すべての組み合わせは、花を選ぶ/選ばないで組み合わせを決めれる

    ans = (modpow(2, n, mod) - 1) % mod

    # a本選んだときの数を引く
    c_a = 1
    for i in range(n, n-a, -1):
        c_a *= i
        c_a %= mod
    c_a *= modpow(factorial(a), mod-2, mod)
    ans -= c_a
    ans %= mod

    # b本選んだときの数を引く
    c_b = 1
    for i in range(n, n-b, -1):
        c_b *= i
        c_b %= mod
    c_b *= modpow(factorial(b), mod-2, mod)
    ans -= c_b
    ans %= mod

    print(ans)


if __name__ == "__main__":
    main()


# Optimized solution
def modpow(a, n, p):
    if n == 0:
        return 1
    elif n == 1:
        return a % p
    if n % 2 == 1:
        return (a * modpow(a, n-1, p)) % p
    tmp = modpow(a, n//2, p)
    return (tmp * tmp) % p


def modfactrial(a, p):
    ret = 1
    for i in range(a, 1, -1):
        ret = ret * i % p
    return ret


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

    # まずは繰り返し2乗法によって全部の組み合わせを求める
    # すべての組み合わせは、花を選ぶ/選ばないで組み合わせを決めれる

    ans = (modpow(2, n, mod) - 1) % mod

    # a本選んだときの数を引く
    c_a = 1
    for i in range(n, n-a, -1):
        c_a *= i
        c_a %= mod
    c_a *= modpow(modfactrial(a, mod), mod-2, mod)
    ans -= c_a
    ans %= mod

    # b本選んだときの数を引く
    c_b = 1
    for i in range(n, n-b, -1):
        c_b *= i
        c_b %= mod
    c_b *= modpow(modfactrial(b, mod), mod-2, mod)
    ans -= c_b
    ans %= mod

    print(ans)


if __name__ == "__main__":
    main()
# Original solution
import itertools
import math
n,a,b = list(map(int,input().split()))

mod = 10**9+7

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

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



# Optimized solution

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

mod = 10**9+7

def comb(n,r):
	u = 1
	d = 1
	for i in range(n-r+1,n+1):
		u = u*i%mod

	for i in range(1,r+1):
		d = d*i%mod
	D = pow(d,mod-2,mod)

	return u*D%mod

ans = pow(2,n,mod)-1-comb(n,a)-comb(n,b)

print((ans%mod))
# Original solution

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

mod = 10**9+7

def comb(n,r):
	u = 1
	d = 1
	for i in range(n-r+1,n+1):
		u = u*i%mod

	for i in range(1,r+1):
		d = d*i%mod
	D = pow(d,mod-2,mod)

	return u*D%mod

ans = pow(2,n,mod)-1-comb(n,a)-comb(n,b)

print((ans%mod))

# Optimized solution
n,a,b = list(map(int,input().split()))
p = 10**9 + 7
def comb(n,r):
	bunshi = 1
	for i in range(n-r+1,n+1):
		bunshi = bunshi * i % p
	bunbo = 1
	for i in range(1,r+1):
		bunbo = bunbo * i % p

	return bunshi * pow(bunbo,p-2,p)


s = -1 + pow(2,n,p) - comb(n,a) -comb(n,b)

print((s%p))
# Original solution
N, A, B = list(map(int, input().split()))
MAX = max(A, B) + 1
MOD = 1000000007
nCk = [0] * MAX
nCk[0] = 0
nCk[1] = N


def mod_pow(a, n, m):
    res = 1
    while n != 0:
        if n & 1:
            res = (res * a) % m
        n = n >> 1
        a = (a * a) % m
    return res


def mod_inv(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


for i in range(2, MAX):
    nCk[i] = (nCk[i-1] * ((N-i+1) * mod_inv(i, MOD))) % MOD

count = (mod_pow(2, N, MOD) - 1 - nCk[A] - nCk[B]) % MOD
print((int(count)))


# Optimized solution
N, A, B = list(map(int, input().split()))
MAX = max(A, B) + 1
MOD = 1000000007
nCk = [0] * MAX
nCk[0] = 0
nCk[1] = N
inv = [0] * MAX
inv[1] = 1


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

count = (pow(2, N, MOD) - 1 - nCk[A] - nCk[B]) % MOD
print((int(count)))
# Original solution
N, A, B = list(map(int, input().split()))

class remainder():
    def __init__(self, mod=(10**9 + 7)):
        self.mod = mod
    
    def sub(self, a, b):

        return (a + self.mod - b) % self.mod
    
    def mul(self, a, b):

        return ((a % self.mod) * (b % self.mod)) % self.mod

    def pow(self, a, b):
        bp = []
        #bp.append(1)
        bp.append(a)

        n = len(bin(b)) - 2
        for x in range(n):
            bp.append(bp[x]**2 % self.mod)

        res = 1
        for x in range(n):
            if b >> x & 1:
                res = (res * bp[x]) % self.mod
        
        return res

    def div(self, a, b):
        
        return self.mul(a, self.pow(b, self.mod - 2))

com = [0] * (B + 1)
com[0] = 1

re = remainder()

ans = re.pow(2, N) - 1
for x in range(1, B + 1):
    s = re.sub(N, x) + 1
    d = re.div(s, x)
    com[x] = re.mul(com[x - 1], d)

subA = com[A]
subB = com[B]

ans = re.sub(ans, subA)
ans = re.sub(ans, subB)

print(ans)


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

class remainder():
    def __init__(self, mod=(10**9 + 7)):
        self.mod = mod
    
    def sub(self, a, b):

        return (a + self.mod - b) % self.mod
    
    def mul(self, a, b):

        return ((a % self.mod) * (b % self.mod)) % self.mod

    def pow(self, a, b):
        bp = []
        #bp.append(1)
        bp.append(a)

        n = len(bin(b)) - 2
        for x in range(n):
            bp.append(bp[x]**2 % self.mod)

        res = 1
        for x in range(n):
            if b >> x & 1:
                #res = re.mul(res, bp[x])
                res = (res * bp[x]) % self.mod
        
        return res

    def div(self, a, b):
        
        return self.mul(a, self.pow(b, self.mod - 2))

com = [0] * (B + 1)
com[0] = 1

re = remainder()

ans = re.pow(2, N) - 1
for x in range(1, B + 1):
    s = re.sub(N, x) + 1
    d = re.div(s, x)
    com[x] = re.mul(com[x - 1], d)


subA = com[A]
subB = com[B]

ans = re.sub(ans, subA)
ans = re.sub(ans, subB)

print(ans)
# Original solution
def binom(n, r, mod):
    if n < r or n < 0 or r < 0: return 0
    
    if n - r < r: r = n - r
    if r == 0: return 1
    elif r == 1: return n

    numerator = [(n - r + 1 + k) % mod for k in range(r)]  # (n-r+1)*(n-r+2)*...*(n-1)*n
    denominator = [1 + k for k in range(r)]         # 1*2*...*(r-1)*r

    X = 1; Y = 1
    for k in range(r):
        X = (X * ((n - r + 1 + k) % mod)) % mod
        Y = (Y * ((1 + k) % mod)) % mod
    return X * pow(Y, mod-2, mod)

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

# Optimized solution
def binom(n, r, mod):
    if n < r or n < 0 or r < 0: return 0
    
    if n - r < r: r = n - r
    if r == 0: return 1
    elif r == 1: return n

    X = 1; Y = 1
    for k in range(r):
        X = (X * ((n - r + 1 + k) % mod)) % mod
        Y = (Y * ((1 + k) % mod)) % mod
    return X * pow(Y, mod-2, mod)

MOD = 10**9 + 7
n, a, b = list(map(int, input().split()))
ans = (pow(2, n, MOD) - 1 - ((binom(n, a, MOD) + binom(n, b, MOD)) % MOD)) % MOD
print(ans)
# Original solution
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%=mod

    return result


allp=pow(2,n,mod)-1
ans=(allp-cmb(n,a)%mod-cmb(n,b)%mod+mod)%mod
if n==2:
    ans=0

print(ans)

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

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

    #X//Y
    X=1
    Y=1
    for i in range(r):
        X*=(n-i)
        X%=mod
        Y*=(i+1)
        Y%=mod
        
    inv=pow(Y,mod-2,mod)
    return (X*inv)%mod
        
        


allp=pow(2,n,mod)-1
ans=(allp-cmb(n,a,mod)-cmb(n,b,mod))%mod
if n==2:
    ans=0

print(ans)
# Original solution
n,a,b = list(map(int,input().split()))

mod = 1000000007

def modpow(a,n,m):
    x = 1
    while n:
        if n%2: x *= a
        a *= a
        a %= m
        n //= 2
    return x

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

ans = modpow(2,n,mod) - 1
ans -= nCr(n,a,mod)
ans -= nCr(n,b,mod)
ans %= mod
if ans<0: ans += mod
print(ans)

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

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

ans = pow(2,n,M) - 1
ans -= nCr(n,a,M)
ans -= nCr(n,b,M)
ans %= M
if ans<0: ans += M
print(ans)
# Original solution
mod = 10**9+7
n,a,b = list(map(int,input().split()))
base = pow(2,n,mod)-1
def comb(n,k):
  comb = 1
  for i in range(n-k+1,n+1):
    comb *= i
    comb %= mod
  for i in range(1, k+1):
    comb *= pow(i,mod-2,mod)
    comb %= mod
  return comb
print(((base-comb(n,a)-comb(n,b))%mod))

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


def comb(n: int, k: int, MOD: int) -> int:
    if n < k or n < 0 or k < 0:
        return 0
    k = min(k, n - k)
    if k == 0:
        return 1
    iinv = [1] * (k + 1)
    ans = n
    for i in range(2, k + 1):
        iinv[i] = MOD - iinv[MOD % i] * (MOD // i) % MOD
        ans *= (n + 1 - i) * iinv[i] % MOD
        ans %= MOD
    return ans


ans = ((1 << n) - 1) % MOD
ans -= comb(n, a, MOD)
ans -= comb(n, b, MOD)
ans %= MOD
print(ans)


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


def comb(n: int, k: int, MOD: int) -> int:
    if n < k or n < 0 or k < 0:
        return 0
    k = min(k, n - k)
    if k == 0:
        return 1
    iinv = [1] * (k + 1)
    ans = n
    for i in range(2, k + 1):
        iinv[i] = MOD - iinv[MOD % i] * (MOD // i) % MOD
        ans *= (n + 1 - i) * iinv[i] % MOD
        ans %= MOD
    return ans


# ans = ((1 << n) - 1) % MOD
ans = (pow(2, n, MOD) - 1) % MOD
ans -= comb(n, a, MOD)
ans -= comb(n, b, MOD)
ans %= MOD
print(ans)