n, m = map(int, input().split())
A = [int(input()) for _ in range(m)]

DP = [0] * (n + 1)
DP[0] = 1
for i in range(n):
    if i + 1 not in A:
        DP[i + 1] += DP[i]
    if i + 2 not in A and i + 2 <= n:
        DP[i + 2] += DP[i]

print(DP[-1] % 1000000007)