N, M = map(int, input().split())
MOD = 10 ** 9 + 7
dp = [0 for _ in range(N)]
for _ in range(M):
    a = int(input())
    a -= 1
    dp[a] = -1
if dp[0] == 0:
    dp[0] = 1
if dp[1] == 0:
    if dp[0] == 1:
        dp[1] = 2
    else:
        dp[1] = 1

for i in range(2, N):
    if dp[i] != -1:
        if dp[i-1] != -1:
            dp[i] += dp[i-1]
        if dp[i-2] != -1:
            dp[i] += dp[i-2]
print(dp[N-1] % MOD)