program main
    implicit none
    integer(8):: n, a, b, ans=0
    integer(8):: i,j,k
    integer(8),parameter:: md=1000000007
    integer(8),allocatable:: fn, ifa, ifb, ifna, ifnb, cb, ca

    read*, n, a, b
    fn=1; ifa=1; ifb=1; ifna=1; ifnb=1
    do i=1,n
        fn = mod(fn*i,md)
        if (i == a) ifa = inverse(fn,md)
        if (i == b) ifb = inverse(fn,md)
        if (i == n-a) ifna = inverse(fn,md)
        if (i == n-b) ifnb = inverse(fn,md)
    end do
    ans = 1
    block;integer(8):: p,ta
        p=n
        ta=2
        do while(p>0)
            if (mod(p,2) == 1) ans=mod(ans*ta,md)
            p=p/2
            ta=mod(ta*ta,md)
        end do
        end block

        ca = mod(mod(fn*ifa,md)*ifna,md)
        cb = mod(mod(fn*ifb,md)*ifnb,md)

    print*, ans-1, ca, cb
    print*, mod(ans-1-ca-cb+2*md, md)
contains




function inverse(x, md) result(inv)
    integer(8),value:: x
    integer(8):: md, inv
    integer(8):: p
    inv=1
    p = md-2

    do while(p > 0)
        if (mod(p,2) == 1) inv = mod(inv*x, md)
        p = rshift(p,1)
        x=mod(x*x,md)
    end do
    
end function


end program
