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

dp = [0]*(N+1)

dp[0] = 1
for now in range(N+1):
    next1 = now + 1
    next2 = now + 2
    if next1 <= N:
        if next1 not in A:
            dp[next1] += dp[now]
    if next2 <= N:
        if next2 not in A:
            dp[next2] += dp[now]
print(dp[N]%1000000007)