import sys
from collections import defaultdict

stairs = []
steps = []
MOD = 1000000007

n, m = int(input()), int((input()))
stairs = {int(input()):True for i in range(m)}

step = defaultdict(int)
step[0] = 1

for i in range(n):
    if i in stairs.keys():
        step[i] = 0
    else:
        step[i+1] = (step[i] + step[i+1]) % MOD
        step[i+2] = (step[i] + step[i+2]) % MOD

print(step[n])
