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

