(defvar *mod* 1000000007)

(defun rec (goal unuse-lst now)
    (cond ((eq goal now) 1)
        ((< goal now) 0)
        ((not (null (find now unuse-lst))) 0)
        (t (+ (rec goal unuse-lst (+ 1 now))
               (rec goal unuse-lst (+ 2 now))))))

(defun solve (goal unuse-lst)
    (let ((result (rec goal unuse-lst 0)))
        (print (mod result *mod*))))

(let ((goal (read))
         (num (read))
         (lst '()))
    (dotimes (i num)
        (push (read) lst))
    (solve goal lst))
