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

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