N, M = (int(i) for i in input().split())
A = [1]*(N+1)
for i in range(M):
  a = int(input())
  A[a] = -1

ans = 0
dp=[[0 for i in range(N+1)] for j in range(N+1)]
#dp[何回目の移動か][今どこにいるか] = 何通りあるか
dp[0][0] = 1

for i in range(N):
  for j in range(N):
    if j+1 <= N:
      if A[j+1] == 1:
        dp[i+1][j+1] += dp[i][j]
    if j+2 <= N:
      if A[j+2] == 1:
        dp[i+1][j+2] += dp[i][j]

for i in range(N):
  ans += dp[i][N]

print(ans%1000000007)
