import sys
sys.setrecursionlimit(100000)

def intinput(): return map(int,sys.stdin.readline().split())

n,m=intinput()
a=[]
memo={x:0 for x in range(n+4)}
memo[0]=1
mod = 10**9+7
for i in range(m):
    a.append(int(input()))
for i in range(n):
    if i+1 not in a:
        memo[i+1]=(memo[i+1]+memo[i])%mod
    if i+2 not in a:
        memo[i+2]=(memo[i+2]+memo[i])%mod
print(memo[n])