n,m= map(int,input().split())
a = [int(input()) for _ in range(m)]
d = [0]*(n+1)
if not 1 in a : d[1] = 1
if not 2 in a : d[2] = d[1] + 1
for i in range(3,n+1):
    if not i in a :
        d[i] += d[i-1] + d[i-2]
print(d[i]%1000000007)