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

dp = [ 0 for _ in range(N+5)]

dp[0] = 1
for i in range(N):
    if i in A:
        dp[i] = 0
        continue

    dp[i+1] += dp[i]
    dp[i+2] += dp[i]
    dp[i] %= 1000000007

print(dp[N] % 1000000007)
