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

MOD= 1000000007

c=[0]*(n+1)
c[0]=1
if 1 in a:
    c[1]=0
else:
    c[1]=1

for i in range(2,n+1):
    if i in a:
        continue
    else:
        c[i] = (c[i - 1] + c[i - 2]) % MOD

print(c[n])