import strutils,sequtils,future
let
 nm=stdin.readline.split.map(parseInt)
 (n,m)=(nm[0],nm[1])
if n<m*2:
 echo 0
 quit()
var
 broken=repeat(true,n+1)
 dp=repeat(0,n+2)
for i in 1..m:
 broken[stdin.readline.parseInt]=false
dp[0]=0
dp[1]=1
for i in 1..n:
 if broken[i]:
  dp[i+1]=dp[i]+dp[i-1]
 else:
  dp[i+1]=0
echo(dp[n] mod 1000000007)