import sys

mod = int(1e9+7)

def dfs(i,dp,bad):
  	if i == 0:
      return 1
    if i in dp:
      return dp[i]
	dp[i] = 0;
    for d in (1,2):
      x = i-d;
      if 0 <= x and x not in bad:
        dp[i] += dfs(x)
        dp[i] %= mod
	return dp[i]
  
n = int(sys.stdin.next())
m = int(sys.stdin.next())
bad = set()
for _ in range(m):
  a = int(sys.stdin.next())
  bas.add(a)
print(dfs(n,dict(),bad))
