#ABC129C-TypicalStairs.py

#import list
import numpy as np
from sys import stdin, setrecursionlimit
from functools import lru_cache

input = stdin.readline
setrecursionlimit(1000)

#constant
#N = int(input())
N, M = list(map(int,input().split()))
A = [int(input()) for _ in range(M)]

#variable
rootList = [1]+[0]*(N)

#function

#class

#main function
def main():
    for i in range(N):
        rootList[i+1] = rootList[i]+rootList[i-1]
        if i+1 in A:
            rootList[i+1] = 0
    print(rootList[N]%1000000007)

if __name__ == "__main__":
    main()
