N, M = map(int, input().split())
a = [0] * M
for i in range(M):
    a[i] = int(input())

mod = 10 ** 9 + 7

dp = [0] * 100010

j = 0
dp[0] = 1
if a[0] == 1:
    dp[1] = 0
    j += 1
else:
    dp[1] = 1

a += [-1]
for i in range(2, N+1):
    if i == a[j]:
        dp[i] = 0
        j += 1
    else:
        dp[i] = dp[i-1] + dp[i-2]
        dp[i] %= mod

print(dp[N] % mod)