n,m=map(int,input().split())
a=[0]*m
for i in range(m):
    a[i]=int(input())
p0=1
if 1 in a:
    p1=0
else:
    p1=1
for i in range(2,n+1):
    if i in a:
        p2=0
    else:
        p2=p1+p0
    p0,p1=p1,p2
print(p1%1000000007)
