import sys
from bisect import bisect_left
N, M = map(int, input().split())
MOD = 10 ** 9 + 7
NMAX = 10 ** 5

A = []
for _ in range(M):
    A.append(int(input()))

dp = [None for _ in range(N+1)]
dp[0] = 1
dp[1] = 0 if A[0] == 1 else 1
for i in range(2, N+1):
    if i in A:
        dp[i] = 0
    else:
        dp[i] = (dp[i-2] + dp[i-1]) % MOD

print(dp[-1])
