Public Class Program
  Shared Sub Main()
    Const C As Long = 1000000007
    Dim nab As Long() = Cin.LngArr()
    Dim n As Long = nab(0)
    Dim a As Long = nab(1)
    Dim b As Long = nab(2)
    Dim m As Modulo = New Modulo(b, C)
    Dim ans As Long = m.Pow(2, n)
    ans = (ans - 1) Mod C
    ans = ans + C - m.Ncr(n, a) + C - m.Ncr(n, b) + C
    ans = ans Mod C
    Console.WriteLine(ans.ToString())
  End Sub

  Class Modulo
    Private Factorial As Long()
    Private Inverse As Long()
    Private M As Long

    Public Sub New(size As Long, Optional m As Long = 1)
      Me.M = m
      ReDim Factorial(0 To size)
      Factorial(0) = 1
      For i As Integer = 1 To size
        Factorial(i) = Factorial(i - 1) * i Mod m
      Next
      ReDim Inverse(0 To size)
      Inverse(size) = Pow(Factorial(size), m - 2) Mod m
      For i As Integer = size To 1 Step -1
        Inverse(i - 1) = Inverse(i) * i Mod m
      Next
    End Sub

    Public Function Pow(x As Long, y As Long) As Long
      If y = 0 Then Return 1
      If y Mod 2 = 0 Then
        Dim d As Long = Pow(x, y / 2)
        Return (d * d) Mod Me.M
      Else
        Return (x * Pow(x, y - 1)) Mod Me.M
      End If
    End Function

    Public Function Ncr(n As Long, r As Long) As Long
      ' nCr = (n - r + 1) * … * n * r!^-1 '
      Dim ans As Long = 1
      For i As Long = n - r + 1 To n 
        ans = (ans * i) Mod Me.M
      Next 
      Return (ans * Inverse(r)) Mod Me.M
    End Function
  End Class
End Class

Public Class Cin
  Public Shared Function Str() As String
    Return Console.ReadLine().Trim()
  End Function
  Public Shared Function Int() As Integer
    Return Integer.Parse(Str())
  End Function
  Public Shared Function Lng() As Long
    Return Long.Parse(Str())
  End Function
  Public Shared Function Dbl() As Double
    Return Double.Parse(Str())
  End Function
  Public Shared Function StrArr(Optional separator As String = " ") As String()
    Return Str().Split(separator)
  End Function
  Public Shared Function IntArr(Optional separator As String = " ") As Integer()
    Return Array.ConvertAll(Of String, Integer)(StrArr(separator), AddressOf Integer.Parse)
  End Function
  Public Shared Function LngArr(Optional separator As String = " ") As Long()
    Return Array.ConvertAll(Of String, Long)(StrArr(separator), AddressOf Long.Parse)
  End Function
  Public Shared Function DblArr(Optional separator As String = " ") As Double()
    Return Array.ConvertAll(Of String, Double)(StrArr(separator), AddressOf Double.Parse)
  End Function
End Class