import sys
sys.setrecursionlimit(10 ** 9)
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N, M = lr()
A = []
for m in range(M):
    a = ir()
    A.append(a)
C = [0 for _ in range(N+1)]
C[0] = 1
for i in range(len(C)):
    if i in A:
        continue
    if i >= 2:
        C[i] += C[i-2]
    if i >= 1:
        C[i] += C[i-1]

print(C[N] % 1000000007)
