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

dp[N-1] = 1
dp[N-2] = 1 + dp[N-1]

mod = 10**9+7

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

print(dp[0])