sum_ = [0]

N,M = input().split()
N,M = int(N),int(M)
m_ = [0,N-1]
for i in range(M):
    m_.append(int(input()))
#m = sorted(m)

m = [1 for i in range(N+1)]
for i in m_:
    m[i] = 0
for i in range(1,N+1):
    if(i==1):
        if(m[i]==1):
            sum_.append(1)
        else:
            sum_.append(0)
    elif(i==2):
        if(m[i]==1):
            sum_.append(1+sum_[1])
        else:
            sum_.append(sum_[1])
    
    else:
        sum_.append(m[i-1]*sum_[i-1]+m[i-2]*sum_[i-2])
#print(sum_)
print(sum_[N]%1000007)