from collections import deque

N, M = map(int, input().split())
a = deque([int(input()) for _ in range(M)])

before1 = 1
before2 = 0
ai = a.popleft if len(a) else 0

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

print(before1)
