import sys
N,M = map(int,input().split())
intact = [True for _ in range(N)]
dp = [0 for _ in range(N+1)]
MOD = 1000000007
for i in range(M):
  a = int(input())
  if N == 1:
    print(1)
    sys.exit(0)
  intact[a] = False
dp[0] = 1
if (intact[1]):
  dp[1] = 1
for i in range(2,N+1):
  if intact[i-2]:
    dp[i] += dp[i-2]
  if intact[i-1]:
    dp[i] += dp[i-1]
  dp[i] %= MOD
print(dp[N])