n,m=map(int,input().split())
s=[]
for i in range(m):
    s.append(int(input()))
l=[1]
if s[0]!= 1:l.append(1)
else:l.append(0)
for i in range(2,n+1):
    if i in s:num=0
    else:num = (l[i-2]+l[i-1])%1000000007
    l.append(num)
print(l[-1])