n, m = map(int, input().split())
a=[]
for i in range(m):
    a.append(int(input()))

r=[0]*(n+1)
r[0]=1

for i in range(1,n+1):
    if i in a:
        continue
    r[i]=r[i-1]+r[i-2]

print(r[n]%1000000007)
