CodeEff/ECCO huggingface dataset:
# Original solution
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))


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

    return temp%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()))
mod=10**9+7
def C(n,k,mod):
    k=min(k,n-k)
    comb=1
    for i in range(k):
        temp=(n-i)*pow(i+1,mod-2,mod)
        comb=comb*temp%mod

    return comb

ans=pow(2,n,mod)-1-C(n,a,mod)-C(n,b,mod)
print((ans%mod))
# Original solution
def cmb(n, r, p):
    # nume/deno === nume * pow(deno, p - 2, p) (mod p)
    nume, deno = 1, 1
    for i in range(r):
        nume = nume * (n - i) % p
        deno = deno * (i + 1) % p
    return nume * pow(deno, p - 2, p) % p


if __name__ == "__main__":
    n, a, b = list(map(int, input().split()))
    p = 10 ** 9 + 7

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


# Optimized solution
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)
# Original solution
n, a, b = list(map(int, input().split()))
mod = 10 ** 9 + 7


class ModInt:
    def __init__(self, num, mod):
        self.num = num
        self.mod = mod

    def __str__(self):
        return str(self.num)

    def __repr__(self):
        return "ModInt(num: {}, mod: {}".format(self.num, self.mod)

    def __add__(self, other):
        ret = self.num + other.num
        ret %= self.mod
        return ModInt(ret, self.mod)

    def __sub__(self, other):
        ret = self.num - other.num
        ret %= self.mod
        return ModInt(ret, self.mod)

    def __mul__(self, other):
        ret = self.num * other.num
        ret %= self.mod
        return ModInt(ret, self.mod)

    def pow(self, times):
        pw = pow(self.num, times, self.mod)
        return ModInt(pw, self.mod)

    def inverse(self):
        return self.pow(self.mod - 2)

    def __truediv__(self, other):
        num = self * other.inverse()
        return ModInt(num, self.mod)


class CombinationSmall:
    def __init__(self, n, k, mod):
        self.n = n
        self.k = k
        self.mod = mod
        self.fact = [ModInt(1, mod)]
        self.inverse = [ModInt(1, mod)]
        for i in range(1, k + 1):
            self.fact.append(self.fact[-1] * ModInt(n - i + 1, mod))
            self.inverse.append(self.inverse[-1] * ModInt(i, mod).inverse())

    def comb(self, k):
        if k > self.k:
            return ModInt(0, self.mod)

        return self.fact[k] * self.inverse[k]


comb = CombinationSmall(n, min(n, 2 * 10 ** 5), mod)

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

print(ans)


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

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

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

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

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


def comb(k):
    ret = 1
    for i in range(1, k + 1):
        ret *= n - i + 1
        ret %= mod
        ret *= inv[i]
        ret %= mod

    return ret


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

def modinv(n):
    return pow(n, M-2, M)

def comb(n, r):
    num = 1
    for i in range(n,n-r,-1):
        cur = i
        while cur%M == 0:
            cur //= M
        num = (num*cur)%M

    denom = 1
    for i in range(1,r+1):
        cur = i
        while cur%M == 0:
            cur //= M
        denom = (denom*cur)%M

    return num * modinv(denom) % M


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

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

def modinv(n):
    return pow(n, M-2, M)

def comb(n, r):
    num = denom = 1
    for i in range(1,r+1):
        num = (num*(n+1-i))%M
        denom = (denom*i)%M
    return num * modinv(denom) % M

print(((pow(2, n, M) - comb(n, a) - comb(n, b) - 1) % M))
# Original solution
from math import factorial
n, a, b = list(map(int, input().split()))

mod = 10**9+7


def inv(a, mod):
    r = [1, 0, a]
    w = [0, 1, mod]
    while w[2] != 1:
        q = r[2]//w[2]
        r_new = [r[0]-q*w[0], r[1]-q*w[1], r[2]-q*w[2]]
        r = w
        w = r_new
    x, y = w[0], w[1]    # a*x+y*mod = 1
    return (mod+x % mod) % mod


max_num = 2*10**5+1
fact = [0 for _ in range(max_num)]
ifact = [0 for _ in range(max_num)]

fact[0] = fact[1] = 1
ifact[0] = ifact[1] = 1

for i in range(2, max_num):
    fact[i] = fact[i-1] * i % mod
    ifact[i] = ifact[i-1] * inv(i, mod) % mod


def comb(x, y):
    tmp = 1
    for i in range(1, y+1):
        tmp *= (n+1-i)
        tmp %= mod
    tmp *= ifact[y]
    tmp %= mod
    return tmp

po = [2]
for i in range(1, 100):
    po.append((po[-1]**2) % mod)

nb = list(bin(n)[2:])[::-1]
n2 = 1

for i in range(len(nb)):
    if nb[i] == '1':
        n2 *= po[i]

n2 %= mod

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


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

mod = 10**9+7


def comb(x, y):
    numer = 1
    denom = 1
    for i in range(1, y+1):
        numer *= n+1-i
        numer %= mod
        denom *= i
        denom %= mod
    denom = pow(denom, mod-2, mod)
    return numer * denom


print(((pow(2, n, mod)-1-comb(n, a)-comb(n, b)) % mod))
# Original solution
import math

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

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

def mod_inv_table(k):
    table = [-1] * (k+1)
    for i in range(1,k+1):
        table[i] = mod_inv(i,10**9+7)
    return table

def binomial(n,k,table):
    ret = 1
    for i in range(k):
        ret *= n-i
        ret *=table[i+1]
        ret %= 10**9+7
    return ret
    

tablea = mod_inv_table(a)
tableb = mod_inv_table(b)
ka = binomial(n,a,tablea)
kb = binomial(n,b,tableb)
alla = pow(2,n,10**9+7)
z = alla - ka -kb -1
print((z%(10**9+7)))

# Optimized solution
n,a,b = list(map(int,input().split()))
mod = 10**9 + 7
aue,bue = 1,1
for i in range(a):
    aue = aue * (n-i) % mod
for i in range(b):
    bue = bue * (n-i) % mod
asita,bsita = 1,1
for i in range(1,a+1):
    asita = asita*i %mod
for i in range(1,b+1):
    bsita = bsita*i %mod
at = aue * pow(asita,mod-2,mod)
bt = bue * pow(bsita,mod-2,mod)

ans = (pow(2,n,mod) - 1 -at -bt)%mod
print(ans)
# Original solution
mod = 1000000007

def pw(x, n):
    if n == 0: return 1
    elif n == 1: return x
    elif n % 2 == 0:
        return pw(x, n // 2) ** 2 % mod
    else:
        return x * pw(x, n // 2) ** 2 % mod

def dv(x, y):
    return x * pow(y, mod - 2, mod) % mod

def comb(n, r):
    p, q = 1, 1
    if n < r or n < 0 or r < 0: return 0
    for i in range(r):
        p = p * (n - i) % mod
        q = q * (i + 1) % mod
    return dv(p, q)

n, a, b = list(map(int, input().split()))
ans = pow(2, n, mod) - 1 + mod * 10
if a <= n: ans -= comb(n, a)
if b <= n: ans -= comb(n, b)
print((ans % mod))

# Optimized solution
def dv(x, y, mod):
    # x / y = x * (y ** (mod - 2))
    return x * pow(y, mod - 2, mod) % mod

def comb(n, r, mod):
    # p / q = p * (q ** (mod - 2))
    p, q = 1, 1
    if n < r or n < 0 or r < 0: return 0
    for i in range(r):
        p = p * (n - i) % mod
        q = q * (i + 1) % mod
    return dv(p, q, mod)

mod = 1000000007
n, a, b = list(map(int, input().split()))
# pow(a, b, c) = (a ** b) % c
ans = pow(2, n, mod) - 1
if 0 <= n: ans -= comb(n, a, mod)
if 0 <= n: ans -= comb(n, b, mod)
print((ans % mod))
# Original solution
n, a, b = list(map(int, input().split()))

MOD = 1000000007

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

ans = pow(2, n, MOD)
ans -= 1
ans -= comb(n, a)
ans -= comb(n, b)
while ans < 0:
    ans += MOD
print(ans)

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

MOD = 1000000007

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

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

ans -= x * pow(y, MOD - 2, MOD) % MOD

while ans < 0:
    ans += MOD
print(ans)
# Original solution
n, a, b = list(map(int, input().split(' ')))

# 二項係数 mod [検索]
mmm = 1000000000 + 7
fac = []
inv = []
inv_fac = []
def init(n):
    fac.append(1)
    fac.append(1)
    inv.append(0)
    inv.append(1)
    inv_fac.append(1)
    inv_fac.append(1)
    for i in range(2, n):
        fac.append(fac[-1] * i % mmm)
        inv.append(mmm - inv[mmm%i] * (mmm // i) % mmm)
        inv_fac.append(inv_fac[-1] * inv[-1] % mmm)

def choice(a, b):
    if a < b:
        return 0
    v = 1
    for i in range(b):
        v = (v * (n-i)) % mmm
    return v * inv_fac[b]

init(int(2e5) + 1)


ans = pow(2, n, mmm) - 1  # v, e, mod
bunshi = 1
for i in range(a):
    bunshi = (bunshi * (n-i)) % mmm
ans -= choice(n, a)
ans -= choice(n, b)
print((ans % mmm))

'''
4, 1, 3 => 4c2 + 4c4 -> 6+1 = 7
4 + 6 + 4 + 1 - 4c1 - 4c2 
1        1
11       2
121      4
1331     8
14641   16, 0が無いので-1, 大きい combination -> 二項係数 mod [検索]
'''

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

# 二項係数 mod [検索]
mmm = 1000000000 + 7
fac = []
inv = []
inv_fac = []
def init(n):
    fac.append(1)
    fac.append(1)
    inv.append(0)
    inv.append(1)
    inv_fac.append(1)
    inv_fac.append(1)
    for i in range(2, n):
        fac.append(fac[-1] * i % mmm)
        inv.append(mmm - inv[mmm%i] * (mmm // i) % mmm)
        inv_fac.append(inv_fac[-1] * inv[-1] % mmm)

def choice(a, b):
    if a < b:
        return 0
    v = 1
    for i in range(b):
        v = (v * (a-i)) % mmm  # 偶然通っていたけどここはnではなくa (eの途中で気づいた)
    return v * inv_fac[b]

init(int(2e5) + 1)


ans = pow(2, n, mmm) - 1  # v, e, mod
bunshi = 1
for i in range(a):
    bunshi = (bunshi * (n-i)) % mmm
ans -= choice(n, a)
ans -= choice(n, b)
print((ans % mmm))

'''
4, 1, 3 => 4c2 + 4c4 -> 6+1 = 7
4 + 6 + 4 + 1 - 4c1 - 4c2 
1        1
11       2
121      4
1331     8
14641   16, 0が無いので-1, 大きい combination -> 二項係数 mod [検索]
'''
# Original solution
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return eval(input())

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

  inv_b=mod_inv(b,mod)
  # print(a,inv_b)
  return a*inv_b

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

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

    return (K * x)%mod

def extgcd(a,b):
    r = [1,0,a]
    w = [0,1,b]
    while w[2]!=1:
        q = r[2]//w[2]
        r2 = w
        w2 = [r[0]-q*w[0],r[1]-q*w[1],r[2]-q*w[2]]
        r = r2
        w = w2
    #[x,y]
    return [w[0],w[1]]

def mod_inv(a,m):
    x = extgcd(a,m)[0]
    return (m+x%m)%m

def main():
  n,a,b=LI()
  if n==2:
    if a!=b:
      return 0
    else:
      return 1

  ans=pow_k(2,n)

  ans-=(cmb(n,a,mod)%mod)
  ans-=(cmb(n,b,mod)%mod)

  ans-=1
  ans%=mod

  if ans<0:
    ans+=mod

  return ans

# main()
print((main()))


# Optimized solution
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return eval(input())

# n^p(mod m) -- START --
def powMod(n,p,m):
  if p==0:
    return 1
  if p%2==0:
    t=powMod(n,p//2,m)
    return t*t%m
  return n*powMod(n,p-1,m)%m
# n^p(mod m) --- END ---

def main():
  n,a,b=LI()

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

  pattern_a1=1
  for i in range(a):
    pattern_a1*=n-i
    pattern_a1%=mod
  pattern_a2=1
  for i in range(1,a+1):
    pattern_a2*=i
    pattern_a2%=mod
  pattern_a=pattern_a1*pow(pattern_a2,mod-2,mod)

  pattern_b1=1
  for i in range(b):
    pattern_b1*=n-i
    pattern_b1%=mod
  pattern_b2=1
  for i in range(1,b+1):
    pattern_b2*=i
    pattern_b2%=mod
  pattern_b=pattern_b1*pow(pattern_b2,mod-2,mod)

  ans-=pattern_a
  ans%=mod
  if ans<0:
    ans+=mod
  ans-=pattern_b
  ans%=mod
  if ans<0:
    ans+=mod

  return ans

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

mod=10**9+7

def repmod(n,m):
    if n==1:return 2
    nn = n // 2
    te = repmod(nn, m)
    if n%2==0:
        ans=(te*te)%mod
        return ans
    elif n%2==1:
        ans=(2*te*te)%mod
        return ans
def extgcd(a,b):
    a0,b0=a,b
    x0,y0=1,0
    x1,y1=0,1

    while b0!=0:
        q = a0 // b0
        r = a0 % b0

        a0,b0=b0,r
        temp=x1
        x0,x1=x1,x0-q*x1
        y0,y1=y1,y0-q*y1

    return a0,x0,y0

def mo(x,m):
    return (m+x%m)%m

def inv(a,m):
    g,x,y=extgcd(a,m)
    ans=mo(x,m)
    return ans

total=repmod(n,mod)-1

c=max(a,b)

temp=1
s=0
for i in range(c):
    temp=(temp*(n-i))%mod
    invi=inv(i+1,mod)
    temp=temp*invi
    if i+1==a:
        s+=temp
    if i+1==b:
        s+=temp

ans=(total-s)%mod
print(ans)

# Optimized solution
def inv(N):
    #n^-1
    inv=[1,1]

    for i in range(2,N+1):
        inv.append(mod-mod//i*inv[(mod%i)]%mod)
    return inv
n,a,b=list(map(int,input().split()))

mod=10**9+7

def repmod(n,m):
    if n==1:return 2
    nn = n // 2
    te = repmod(nn, m)
    if n%2==0:
        ans=(te*te)%mod
        return ans
    elif n%2==1:
        ans=(2*te*te)%mod
        return ans


total=repmod(n,mod)-1

c=max(a,b)

temp=1
s=0
invlist=inv(c)
for i in range(c):
    temp=(temp*(n-i))%mod
    invi=invlist[i+1]
    temp=temp*invi
    if i+1==a:
        s+=temp
    if i+1==b:
        s+=temp

ans=(total-s)%mod
print(ans)
# Original solution
n,a,b = list(map(int,input().split()))
mod = 10**9+7
import sys
sys.setrecursionlimit(10**9)
ans = 1
now = n
def power(x, y):
  if   y == 0     : return 1
  elif y == 1     : return x % mod
  elif y % 2 == 0 : return power(x, y//2)**2 % mod
  else            : return power(x, y//2)**2 * x % mod
ans = power(2,n)
com = [0]*(b+1)
com[0]=1
N = b+1
inv_t = [0]+[1]
for i in range(2,N):
  inv_t += [inv_t[mod % i] * (mod - int(mod / i)) % mod]
for i in range(1,b+1):
  com[i] = ((com[i-1]*(n-i+1))%mod)*(inv_t[i])%mod
ans -= com[a]+com[b]+1
print((ans%mod))

# Optimized solution
n,a,b = list(map(int,input().split()))
mod = 10**9+7
ans = pow(2,n,mod)-1
inv_t = [0]+[1]
for i in range(2,b+1):
  inv_t += [inv_t[mod % i] * (mod - int(mod / i)) % mod]
nCk = [1]*(b+1)
for i in range(1,b+1):
  nCk[i]=(((nCk[i-1]*(n-i+1))%mod)*inv_t[i])%mod
ans -= nCk[a]+nCk[b]
print((ans%mod))
# Original solution
def d_bouquet(MOD=10**9 + 7):
    N, A, B = [int(i) for i in input().split()]
    from operator import mul
    from functools import reduce

    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

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

    return (ans + MOD) % MOD

print((d_bouquet()))

# Optimized solution
from functools import reduce
def d_bouquet(MOD=10**9 + 7):
    from functools import reduce
    N, A, B = [int(i) for i in input().split()]

    def comb(m, r):
        numerator = reduce(lambda x, y: x * y % MOD, list(range(m, m - r, -1)))
        denominator = reduce(lambda x, y: x * y % MOD, list(range(1, r + 1)))
        return (numerator * pow(denominator, MOD - 2, MOD)) % MOD

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

print((d_bouquet()))
# Original solution
n, a, b = list(map(int, input().split()))
 
mod = 10 ** 9 + 7
 
if n == 2:
   print((0))
   exit()
                
S = pow(2, n, mod) -1 

x1 = 1
y1 = 1
for i in range(a):
  x1 = x1 * (n-i) % mod
  y1 = y1 * (i+1) % mod
A = (x1 * pow(y1, mod - 2, mod)) % mod

x2 = 1
y2 = 1
for i in range(b):
  x2 = x2 * (n-i) % mod
  y2 = y2 * (i+1) % mod
B = (x2 * pow(y2, mod - 2, mod)) % mod

print(((S - A - B) % mod))

# Optimized solution
n, a, b = list(map(int, input().split()))
 
mod = 10 ** 9 + 7
 
if n == 2:
   print((0))
   exit()
                
S = pow(2, n, mod) - 1

x1 = 1
y1 = 1
for i in range(a):
  x1 = x1 * (n-i) % mod
  y1 = y1 * (i+1) % mod
A = (x1 * pow(y1, mod - 2, mod)) % mod

for i in range(a, b):
  x1 = x1 * (n-i) % mod
  y1 = y1 * (i+1) % mod
B = (x1 * pow(y1, mod - 2, mod)) % mod

print(((S - A - B) % mod))
# Original solution
n, a, b = list(map(int, input().split()))
MOD = 10 ** 9 + 7

def power_func(a, n, mod):
  bi = bin(n)[2:]
  res = 1
  for i in range(len(bi)):
    res = (res * res) % mod
    if bi[i] == "1":
      res = (res * a) % mod
  return res

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

def combination(n, r, mod):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

def main():
    ans = power_func(a=2, n=n, mod=MOD) - 1
    ans -= combination(n=n, r=a, mod=MOD)
    ans -= combination(n=n, r=b, mod=MOD)
    ans %= MOD
    print(ans)

if __name__ == "__main__":
    main()

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

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

def main():
    ans = pow(2, n, MOD) - 1
    ans -= comb(n=n, r=a, mod=MOD)
    ans -= comb(n=n, r=b, mod=MOD)
    ans %= MOD
    print(ans)

if __name__ == "__main__":
    main()
# Original solution
n, a, b = list(map(int, input().split()))
mod = int(1e+9) + 7
def extgcd(a, b):
  if b == 0:
    return 1, 0
  else:
    x, y, u, v, k, l = 1, 0, 0, 1, a, b
    while l != 0:
      x, y, u, v = u, v, x - u * (k // l), y - v * (k // l)
      k, l = l, k % l
    return x
def inved(x):
  a = extgcd(x, mod)
  return a % mod
def doubling(N, M):
  y = 1
  base = N
  while M != 0:
    if M % 2 == 1:
      y *= base
      y %= mod
    base *= base
    base %= mod
    M //= 2
  return y

A = doubling(2, n)
A = (A - 1) % mod
proda, prodb = 1, 1
for i in range(a):
  proda *= ((n - i) * inved(i + 1)) % mod
  proda %= mod
for i in range(b):
  prodb *= ((n - i) * inved(i + 1)) % mod
  prodb %= mod
print(((A - proda - prodb) % mod))

# Optimized solution
n, a, b = list(map(int, input().split()))
mod = int(1e+9) + 7
def extgcd(a, b):
  if b == 0:
    return 1, 0
  else:
    x, y, u, v, k, l = 1, 0, 0, 1, a, b
    while l != 0:
      x, y, u, v = u, v, x - u * (k // l), y - v * (k // l)
      k, l = l, k % l
    return x
def inved(x):
  a = extgcd(x, mod)
  return a % mod
def doubling(N, M):
  y = 1
  base = N
  while M != 0:
    if M % 2 == 1:
      y *= base
      y %= mod
    base *= base
    base %= mod
    M //= 2
  return y
S = [inved(i+1) for i in range(b)]
A = doubling(2, n)
A = (A - 1) % mod
proda, prodb = 1, 1
for i in range(a):
  proda *= ((n - i) * S[i]) % mod
  proda %= mod
for i in range(b):
  prodb *= ((n - i) * S[i]) % mod
  prodb %= mod
print(((A - proda - prodb) % mod))
# Original solution
n, a, b = list(map(int, input().split()))
p = 10**9+7


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


ans = (pow(2, n, p)-1-comb(n, a)-comb(n, b)) % p
print(ans)


# Optimized solution
class Comb0():
    # あらかじめO(k)の前計算をしておいてr<=kに対してnCrを高速に計算する
    def __init__(self, n, k=10**6, p=10**9+7):
        # num[i]=nPi
        # den[i]=(i!)^(-1)
        num, den = [1], [1]
        a, b = 1, 1
        for i in range(1, k+1):
            a = (a*(n-i+1)) % p
            b = (b*pow(i, p-2, p)) % p
            num.append(a)
            den.append(b)
        self.num = num
        self.den = den
        self.n = n
        self.p = p

    def calc(self, r):
        num, den = self.num, self.den
        if r < 0 or self.n < r:
            return 0
        return (num[r] * den[r]) % self.p


n, a, b = list(map(int, input().split()))
p = 10**9+7
cmb = Comb0(n, k=max(a, b))
print(((pow(2, n, p)-1-cmb.calc(a)-cmb.calc(b)) % p))
# Original solution
from itertools import product


def check_odd(i, j):
    return (i + j) % 2 == 0


def check_even(i, j):
    return i % 2 == 0


def solve(n, d1, d2):
    s1, s2 = 0, 0
    while d1 % 4 == 0:
        d1 >>= 2
        s1 += 1
    while d2 % 4 == 0:
        d2 >>= 2
        s2 += 1

    f1 = check_odd if d1 % 2 else check_even
    f2 = check_odd if d2 % 2 else check_even
    lim = n ** 2

    buf = []
    cnt = 0
    for i, j in product(list(range(2 * n)), repeat=2):
        if f1(i >> s1, j >> s1) and f2(i >> s2, j >> s2):
            buf.append('{} {}'.format(i, j))
            cnt += 1
            if cnt == lim:
                break
    return buf


n, d1, d2 = list(map(int, input().split()))
print(('\n'.join(solve(n, d1, d2))))


# Optimized solution
def check_odd(i, j):
    return (i + j) % 2 == 0


def check_even(i, j):
    return i % 2 == 0


def solve(n, d1, d2):
    s1, s2 = 0, 0
    while d1 % 4 == 0:
        d1 >>= 2
        s1 += 1
    while d2 % 4 == 0:
        d2 >>= 2
        s2 += 1

    f1 = check_odd if d1 % 2 else check_even
    f2 = check_odd if d2 % 2 else check_even
    lim = n ** 2

    buf = []
    cnt = 0
    for i in range(2 * n):
        _i1 = i >> s1
        _i2 = i >> s2
        for j in range(2 * n):
            if f1(_i1, j >> s1) and f2(_i2, j >> s2):
                buf.append('{} {}'.format(i, j))
                cnt += 1
                if cnt == lim:
                    return buf


n, d1, d2 = list(map(int, input().split()))
print(('\n'.join(solve(n, d1, d2))))