N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]

S =[0]*(N + 1)
S[0] = 1
if A[0] == 1:
    S[1] = 0
else:
    S[1] = 1

for i in range(2, N+1):
    if i in A:
        S[i] = 0
    else:
        S[i] = (S[i-1] + S[i-2]) % 1000000007
print(S[N])
