# coding: utf-8
N,M=map(int,input().split())
A=[0]*M
for i in range(M):
    A[i]=int(input())
#print(A)
def dp(n):
    dp=[0]*(N+1)
    dp[0]=1
    dp[1]=0 if 1 in A else 1
    for i in range(N-1):
        if (i+2) in A:
            dp[i+2]=0
        else:
            dp[i+2]=dp[i+1]+dp[i]
    return dp[n]
print(dp(N)%(10**9+7))