MOD = 10**9 + 7
N, M = [int(x) for x in input().split()]
a = set([int(input()) for i in range(M)])
print(a)

dp = [0]*(N + 1)
dp[0] = 1
for step in range(N):
    if not step in a:
        for width in [1, 2]:
            to = step + width
            if to <= N and not to in a:
                dp[to] = (dp[to] + dp[step]) % MOD

print(dp[N])