module Factwithmod
  implicit none
  integer(16),allocatable,dimension(:)::Kaijo
  contains
subroutine initiationFactorial(maxnum,mo)
  implicit none
  integer(16)::maxnum
  integer(16)::mo
  integer(16)::i

  allocate(Kaijo(0:maxnum))
  Kaijo(0)=1
  do i=1,maxnum
    Kaijo(i)=mod(Kaijo(i-1)*i,mo)
  end do
end subroutine

function combination(n,k,l)
implicit none
integer(16),intent(in)::n,k,l
integer(16) combination

combination=mod(Kaijo(N)*inv(Kaijo(K),l)*inv(Kaijo(N-K),l),l)

end function

function inv(K,L)
integer(16),intent(in)::k,l
integer(16) l2,y
integer(16) inv
inv=1
l2=l-2
y=k
do
  if(mod(l2,2)==1)inv=mod(inv*y,l)
  y=mod(y*y,l)
  l2=l2/2
  if(l2==0)exit
end do
end function

function permutation(n,k,mo)
implicit none
  integer(16)::n,k
  integer(16)::mo,permutation
  permutation=mod(Kaijo(N)*inv(Kaijo(N-K),mo),mo)
end function
end module Factwithmod
program ABC156b
    use Factwithmod
    implicit none
    integer(16)::N
    integer(16)::a,b
    integer(16)::mo=10**9+7
    integer(16)::allc
    integer(16)::ans
    read*,N,a,b
    allc=1
    call initiationFactorial(N,mo)
    allc=power_func(2_16,N,mo)-1
    ans=allc-combination(N,a,mo)-combination(N,b,mo)
    ans=mod(ans,mo)
    if(ans<0)ans=ans+mo
    print"(i0)",ans
contains
integer(16) function power_func(a,n,mo)
    integer(16)::a,n,mo
    integer(16)::l2,y
    power_func=1
    l2=N
    y=a
    do
        if(mod(l2,2)==1)power_func=mod(power_func*y,mo)
        y=mod(y*y,mo)
        l2=l2/2
        if(l2==0)exit
    end do
end function power_func
end program ABC156b