N, M = [int(i) for i in input().split()]
a=[]
for i in range(M):
    a +=[int(input())]

ways=[]
nextbreak = -1
try:
    nextbreak=a[0]
except IndexError:
    nextbreak=-1
    
for i in range(N+1):
    if i==nextbreak:
        a = a[1:]
        try:
            nextbreak=a[0]
        except IndexError:
            nextbreak=0
        ways+=[0]
    elif i==0:
        ways +=[1]
    elif i==1:
        ways +=[1]
    else:
        ways+=[(ways[i-2]+ways[i-1])%1000000007]
    if ways[-1]==0 and ways[-2]==0:
        break
        
print(ways[-1])
