n, m = map(int, input().split())

mod = 1_000_000_007

from collections import deque

d = deque()

for _ in range(m):
    d.append(int(input()))

old = 0
new = 1

for i in range(1, n+1):
    if len(d):
        if i != d[0]:
            old, new = new, (old+new) % mod
        else:
            old, new = new, 0
            d.popleft()
    else:
        old, new = new, (old+new) % mod



print(new)