N, M = map(int, input().split())
am = [int(input()) for i in range(M)]
dp = [0]*(N+1)
if not 1 in am:
	dp[1]=1
if not 2 in am:
	dp[2]=1
for i in range(1,N):
    if not (i+1) in am:
        dp[i+1] += dp[i]
    if not (i+2) in am:
        if i+2<=N:
            dp[i+2] += dp[i]
print(dp[N]%(10**9+7))