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