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

mod=10**9+7
dp=[0]*(n+1)
dp[0]=1
if 1 in a:
    dp[1]=0
else:
    dp[1]=1
for nn in range(2,n+1):
    if nn in a:
        dp[nn]=0
#    if nn-1 in a:
    else:
        dp[nn]=(dp[nn-1]+dp[nn-2])%mod

#print(dp)
print(dp[n])
