import Data.List

main = do
    [n, a, b] <- (map read).words <$> getLine
    let kind = (((length $ filter (\x -> length x /= a && length x /= b) $ tails [1..n]) - 1) * n) - 1
    print $ kind `mod` (10^9+7)