l = input().split()
N = int(l[0])
M = int(l[1])

A = []
for i in range(M):
    l = input().split()
    A.append(int(l[0]))

mod = 1000000007

# print(N, M, A)

DP = [0]*(N+2)
DP[0] = 1
for i in range(N):
    if i in A:
        continue
    DP[i + 1] = (DP[i] + DP[i + 1]) % mod
    DP[i + 2] = (DP[i] + DP[i + 2]) % mod
print(DP[N])
