N_M = list(map(int, input().split()))
N = N_M[0]
M = N_M[1]
dis = []
for _ in range(M):
    dis.append(input())

dp = [0 for i in range(N+2)]
dp[0] = 1
if 1 in dis:
    dp[1] = 0
else :
    dp[1] = 1

for i in range(N):
    if i+2 in dis:
        dp[i+2]=0 
    else:
        if i in dis and i+1 in dis:
            dp[i+2]=0 
        else:
            if i in dis :
                dp[i+2]=dp[i+1]%1000000007
            elif i+1 in dis :
                dp[i+2]=dp[i]%1000000007
            else :
                dp[i+2]=dp[i]%1000000007+dp[i+1]%1000000007

print(dp[N])