Scanf.scanf "%d %d %d" (fun n aa bb ->
    let m = 1_000_000_007 in

    let extgcd x y =
        let rec eg r0 r1 a0 a1 b0 b1 =
            if r1 = 0 then a0, b0 else
                let q1 = r0 / r1 in
                eg r1 (r0 mod r1) a1 (a0 - q1 * a1) b1 (b0 - q1 * b1)
        in
        eg x y 1 0 0 1
    in

    let inv x y = (* 1/x in mod y *)
        let c, d = extgcd x y in
        if c < 0 then c + y else c
    in
    let ( +@) a b = (a + b) mod m in
    let ( -@) a b = (((a - b) mod m) + m) mod m in
    let ( *@) a b = ((a mod m) * (b mod m)) mod m in
    let ( /@) a b = a *@ inv b m in

    let rec loop acc i j acc1 =
        let acc = acc *@ i /@ j in
        let acc1 = if j = aa then acc else acc1 in
        if j = bb then acc1, acc else
            loop acc (i - 1) (j + 1) acc1
    in
    let acc1, acc2 = loop 1 n 1 0 in
    let pow2 a =
        let rec loop acc a b =
            if a = 0 then acc else
                let acc = if a mod 2 = 1 then acc *@ b else acc in
                loop acc (a / 2) (b *@ b)
        in
        loop 1 a 2
    in
    let acc = pow2 n -@ acc1 -@ acc2 -@ 1 in
    Printf.printf "%d\n" acc
)