from collections import deque

N, M = map(int, input().split())
Broken = deque()
for _ in range(M):
    broken = int(input())
    Broken.append(broken)

DP = [0] * (N+1)
DP[0] = 1

nex = Broken.popleft()

for i in range(1, N+1):
    if i == nex:
        if len(Broken) >0:
            nex = Broken.popleft()
        continue
    DP[i] = DP[i-1] + DP[i-2]
    DP[i] %= 10**9 + 7
print(DP[N])

