n, m = (int(i) for i in input().split())
a = [int(input()) for i in range(m)]
MOD = 10**9 + 7

d = [0] * (n+5)
d[1] = (1 if len(a) == 0 or a[0] != 1 else 0)
d[2] = (d[1] + 1 if len(a) == 0 or 2 not in a else 0)

for i in range(2,n):
    d[i+1] = d[i] + d[i-1]
    if i+1 in a:
        d[i+1] = 0
print(d[n]%MOD)