mod = 10**9+7
import sys
sys.setrecursionlimit(1000000)

N,M = [int(x) for x in input().split()]
a = [int(input()) for _ in range(M)]
dp = [0 for _ in range(N+1)]
dp[0] = 1
for i in range(N+1):
    if(i in a):
        continue
    if(i<N-1):
        if(i+2 not in a):
            dp[i+2]+=dp[i]
            dp[i+2]%=mod
    if(i<N):
        if(i+1 not in a):
            dp[i+1]+=dp[i]
            dp[i+1]%=mod
print(dp[N])
