let m = 1000000007
let ( * ) a b = a * b mod m
let (-) a b = a - b + if a < b then m else 0
let p n r = Array.(init r ((-) n) |> fold_left ( * ) 1)
let rec f b n = if n <= 0 then 1 else let p = f b (n / 2) in p * p * if n mod 2 = 0 then 1 else b
let c n r = p n r * f (p r r) (m - 2)
let _ = Scanf.scanf "%d %d %d" @@ fun n a b -> f 2 n - 1 - c n a - c n b |> Printf.printf "%d\n"