N, M = map(int,input().split())
A = [int(input()) for _ in range(M)]

dp = [0] * (N+1)
dp[0] = 1

mod = 10**9+7

for i in range(N):
  for j in range(i+1, min(N, i+2)+1):
    if j not in A:
      dp[j] += dp[i]
      dp[j] %= mod
print(dp[N])