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

#dp=[float("inf")*n]
dp=[0]*n
#dp[0]=0
dp[0]=1
for i in range(1,n):
  #print(i,"に来る方法")
  if i in mList: continue
  dp[i]+=dp[i-1]
  #dp[i]=min(dp[i],dp[i-1]+abs(dp[i]-dp[i-1]))
  if i==1: continue
  dp[i]+=dp[i-2]
  #print(dp[i])
  #dp[i]=min(dp[i],dp[i-2]+abs(dp[i]-dp[i-2]))

print(dp[n-1]%1000000007)