n,m=map(int,input().split())
broken=[int(input()) for i in range(m)]
mod=10**9+7

dp=[0]*(n+1)
if 1 not in broken:
  dp[1],dp[2]=1,2
else:
  if 2 not in broken:
    dp[2]=1

for i in range(3,n+1):
  if i in broken:
    dp[i]=0
    
  elif  i-1 not in broken and i-2 not in broken:
    dp[i]=dp[i-1]+dp[i-2]
    dp[i]%=mod
    
  elif i-1 not in broken:
    dp[i]=dp[i-1]
    dp[i]%=mod
    
  elif i-2 not in broken:
    dp[i]=dp[i-2]
    dp[i]%=mod
    
  else:
    dp[i]=0
print(dp[n])