N, M = map(int, input().split())  # N段の階段, 壊れている床の個数M

# A = []

# flag = True
# for i in range(M):
#     A.append(int(input()))
#     if len(A) > 1:
#         if A[i] == A[i-1]+1:
#             print(0)
#             flag = False
#             break

# if flag:

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

dp = [0, 1]

for i in range(1, N+1):
    if i in A:
        dp.append(0)
    else:
        dp.append((dp[-2] + dp[-1]))

print(dp[-1] % 1000000007)
