import           Data.Array.IArray
import           Data.Maybe
import qualified Data.ByteString.Char8 as BS

modN = 1000000007

main :: IO ()
main = do
    [n,_] <- map read . words <$> getLine :: IO [Int]
    a <- map (fst . fromJust . BS.readInt) . BS.lines <$> BS.getContents
    print $ solve n a `mod` modN

solve :: Int -> [Int] -> Int
solve n a = dp!n
  where
    dp = listArray (0,n) (map f [0..n]) :: Array Int Int
    f k
      | k `elem` a = 0
      | k == 0 = 1
      | k == 1 = 1
      | otherwise = dp!(k-1) + dp!(k-2)