N, M = map(int, input().split())
lista = []
for m in range(M):
    am = int(input())
    lista. append(am)
an = 0
an1 = 1 
for n in range(N):
    if n+1 in lista:
        an, an1 = an1, 0
    else:
        an, an1 = an1, (an+an1)%1000000007
print(an1)    
