mod = 1000000007
# inputs
N, M = map(int, input().split())
oks = [True] * (N + 1)
for _ in range(M):
    oks[int(input())] = False

dp = [1] * (N + 1)
for i in range(M):
    dp[i] = 0


for i in range(2, N + 1):
    if oks[i-1]:
        dp[i] = (dp[i-1] + dp[i-2]) % (10**9+7)

print(dp[N])
