MOD = 1000000007

N, M = map(int, input().split())
alist = []
for _ in range(M):
    alist.append(int(input()))

if 1 in alist:
    dp = [1, 0]
else:
    dp = [1, 1]
for i in range(2, N+1):
    dp.append((dp[i-1] + dp[i-2]) % MOD)
    if i in alist:
        dp[-1] = 0

print(dp[N] % MOD)