import           Data.Array.IArray

modN = 1000000007

main :: IO ()
main = do
    [n,_] <- map read . words <$> getLine :: IO [Int]
    a <- map read . lines <$> getContents :: IO [Int]
    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)