from collections import deque

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

a = []
aindex = 0
for _ in range(M):
    a.append(int(input()))

before1 = 1
before2 = 0
if len(a)>0:
    ai = a[aindex]

for i in range(1, N+1):
    if i == ai:
        before2 = before1
        before1 = 0
        if aindex < len(a)-1:
            aindex += 1
            ai = a[aindex]
    else:
        current = divmod(before1 + before2, 10**9+7)[1]
        before2 = before1
        before1 = current


print(before1)
