n,m = map(int,input().split())
s=[int(input()) for i in range(m)]
l=[1]+[0]*(n)
INF=1000000007
if n ==1:
    print(1)
    exit()
if len(s)!=0 and s[0]== 1:l[1]=0
else:l[1]=1

for i in range(2,n+1):
    if i in s:num=0
    else:l[i] = (l[i-2]+l[i-1])%INF
print(l[-1])