N, M = map(int, input().split())

A = []
for _ in range(M):
    A.append(int(input()))

step = [0 for _ in range(N+1)]

step[0] = 1
if 1 not in A:
    step[1] = 1

if len(A) != 0 and A[0] == 1:
    A = A[1:]

for i in range(2, N+1):
    if len(A) != 0 and i == A[0]:
        A = A[1:]
    else:
        step[i] = step[i-1] + step[i-2]


print(step[N] % (10**9+7))
