n,m = map(int,input().split())
max_int = 1000000007
a = [0] * m
for i in range(m):
    a[i] = int(input())
piv = 0
b = [1] * (n+1)
if a[0] == 1:
    piv += 1
    b[1] = 0
for i in range(2,n+1):
    if piv == m:
        b[i] = b[i-1] + b[i-2]
        b[i] %= max_int
    elif i == a[piv]:
        piv += 1
        b[i] = 0
    else:
        b[i] = b[i-1] + b[i-2]
        b[i] %= max_int

print(b[n]%max_int)
