def solve():
  n,m=map(int,input().split())
  broken=[0]*m
  for i in range(m):
    broken[i]=int(input())
  
  dp=[0]*(n+1)
  dp[0]=1
  dp[1]=1 if 1 not in broken else 0

  for i in range(2,len(dp)):
    if i in broken:
      dp[i]=0
    else:
      dp[i]=(dp[i-2]+dp[i-1])%1000000007
  
  print(dp[-1])

solve()