n,m=map(int,input().split())
ans=-1
dp=[0 for i in range(n+1)]
dp[1]=1
if n==1 and m==1:
  ans=0
if n==2 and m==1:
  br=int(input())
  if br==1:
    ans=1
  elif br==2:
    ans=0
if n==2 and m==2:
  ans=0
if n>=2:
  dp[2]=2


q=1000000007
a=[]
if n>=3:
  for i in range(m):
    b=int(input())
    a.append(b)
    if b-a[i-1]==1:
      ans=0
      break
    if b==1:
      dp[1]=0
      dp[2]=1
    if b==2:
      dp[2]=0

  for i in range(3,n+1):
    if i in a:
      continue
    else:
      dp[i]=(dp[i-1]+dp[i-2])
      """print("dp[i]",i,dp[i])"""
if ans==0 or ans==1:
  dp[n]=ans
while(dp[n]>q):
  dp[n]=dp[n]%q
print(dp[n])
