n,m = map(int,input().split())
a = []
for i in range(m):
    a.append(int(input()))

mod = 1000000007
result = [0]*(n+1)
result[0] = 1
for i in range(1,n+1):
    result[i] = (result[i-1] + result[i-2])%mod
    if i in a:
        result[i] = 0

print(result[n])