N,M = map(int,input().split())
a = []

for _ in range(M):
  a.append(input())

S = [0] * (N+1)
S[0] = 1
for n in range(1, N+1):
    if str(n) in a:
        S[n] = 0
    elif n==1:
        S[n] = 1
    else:
        S[n] = (S[n-1] + S[n-2])%1000000007

print(S[n])