Buggy python submission (verdict: Time Limit Exceeded):
# ABC 156 D
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nms = lambda: map(str, input().split())
nl = lambda: list(map(int, input().split()))
# def factorial_mod(n, mod):
#     a = 1
#     for i in range(1, n + 1):
#         a *= i
#         a %= mod
#     return a
# def comb_mod(n, k, mod):
#     if k > n or k < 0:
#         return 0
#     fact_n = factorial_mod(n, mod)
#     fact_k = factorial_mod(k, mod)
#     fact_n_k = factorial_mod(n - k, mod)
#     return (fact_n * pow(fact_k, mod - 2, mod) * pow(fact_n_k, mod - 2, mod)) % mod
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])

    return result
def spow(x, n,mod):
    ans = 1
    while(n > 0):
        if(bin(n & 1) == bin(1)):
            ans = ans*x%mod
        x = x*x%mod
        n = n >> 1 #ビットシフト
    return ans
n,a,b=nm()
MOD = 10**9 + 7
cn=spow(2,n,MOD)
ca=cmb(n,a)
cb=cmb(n,b)
# t=1
# for i in range(n):
#     t*=2%MOD
#     print(t)
# cn=(2**n)%MOD
print((cn-ca-cb-1)%MOD)
# print(ca)
# print(cb)
# ca=comb_mod(n, a, MOD)
# cb=comb_mod(n, b, MOD)
# cn=n*(n+1)*(2*n+1)//12-n*(n+1)//2
# # cn=cn%MOD
# # ca=ca%MOD
# # cb=cb%MOD
# print((cn-ca-cb))

Fixed submission:
# D - Bouquet
def comb(n,k,mod):
    a = 1
    b = 1
    for i in range(k):
        a = a * (n-i) % mod
        b = b * (i+1) % mod
    return a * pow(b, mod-2, mod) % mod
n,a,b=map(int,input().split())
mod=10**9+7
c_n=pow(2,n,mod)-1
c_a=comb(n,a,mod)
c_b=comb(n,b,mod)
print((c_n-c_a-c_b)%mod)

Buggy python submission (verdict: Time Limit Exceeded):
# ABC 156 D
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nms = lambda: map(str, input().split())
nl = lambda: list(map(int, input().split()))
# def factorial_mod(n, mod):
#     a = 1
#     for i in range(1, n + 1):
#         a *= i
#         a %= mod
#     return a
# def comb_mod(n, k, mod):
#     if k > n or k < 0:
#         return 0
#     fact_n = factorial_mod(n, mod)
#     fact_k = factorial_mod(k, mod)
#     fact_n_k = factorial_mod(n - k, mod)
#     return (fact_n * pow(fact_k, mod - 2, mod) * pow(fact_n_k, mod - 2, mod)) % mod
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])

    return result
def spow(x, n,mod):
    ans = 1
    while(n > 0):
        if(bin(n & 1) == bin(1)):
            ans = ans*x%mod
        x = x*x%mod
        n = n >> 1 #ビットシフト
    return ans
n,a,b=nm()
MOD = 10**9 + 7
cn=spow(2,n,MOD)
ca=cmb(n,a)
cb=cmb(n,b)
# t=1
# for i in range(n):
#     t*=2%MOD
#     print(t)
# cn=(2**n)%MOD
print((cn-ca-cb-1)%MOD)
# print(ca)
# print(cb)
# ca=comb_mod(n, a, MOD)
# cb=comb_mod(n, b, MOD)
# cn=n*(n+1)*(2*n+1)//12-n*(n+1)//2
# # cn=cn%MOD
# # ca=ca%MOD
# # cb=cb%MOD
# print((cn-ca-cb))

Fixed submission:
# D - Bouquet
def comb(n,k,mod):
    a = 1
    b = 1
    for i in range(k):
        a = a * (n-i) % mod
        b = b * (i+1) % mod
    return a * pow(b, mod-2, mod) % mod
n,a,b=map(int,input().split())
mod=10**9+7
c_n=pow(2,n,mod)-1
c_a=comb(n,a,mod)
c_b=comb(n,b,mod)
print((c_n-c_a-c_b)%mod)