N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista. append(am)
listans = [0]*N 
for n in range(N):
    if n+1 in lista:
        pass
    elif n == 0:
        listans[0] = 1
    elif n == 1:
        listans[1] = listans[0]+1
    else:
        listans[n] = (listans[n-1]+listans[n-2])%1000000007    
#print(listans)       
ans = listans[N-1] 
print(ans)