import strutils,sequtils,future,math
let
 nm=stdin.readline.split.map(parseInt)
 (n,m)=(nm[0],nm[1])
 a=lc[stdin.readline.parseInt|(k<-1..m),int]
var dp=repeat(0,n+1)
dp[0]=1
if a[0]!=1:
 dp[1]=1
for i in 2..n:
 if i notin a:
  dp[i]=dp[i-1]+dp[i-2]
echo dp[n] mod (10^9+7)