N,M = map(int,input().split())
A = [int(input()) for i in range(M)]
INF = 10**9+7
s = A[0]
A = set(A)

ans = [0]*(N+1)
ans[0] = 1
if s == 1:
    ans[1] = 0
else:
    ans[1] = 1


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