n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
dp = [0 for i in range(n+1)]
dp[0] += 1
mod = 10**9+7
for i in range(1, n+1):
  if i == 1:
    if not i in a:
      dp[i] += dp[i-1]
    else:
      a.remove(i)
  else:
    if not i in a:
      dp[i] += dp[i-1] + dp[i-2]
      dp[i] %= mod
    else:
      a.remove(i)
print(dp[n])