n,m=map(int,input().split())
a=[1]*n
for i in range(m):
        x=int(input())
        a[x-1]=0
mod=10**9+7
if a[0]==0:
        f=[1,1]
else:
        f=[1,2]
for i in range(2,n):
        f.append((a[i-1]*f[i-1]+a[i-2]*f[i-2])%mod)
print(f[-1])