N, M= map(int, input().split())
a =[str(input()) for _ in range(M)]
DP = [0]*(N+1)
num = 1000000007
DP[0] = 1
for i in range(N):
  if str(i) in a:
    DP[i] = 0
  else:
    DP[i] = DP[i] % num 
    if i < N:
      DP[i+1] += DP[i]
      if i < N-1:
        DP[i+2] += DP[i]
print(DP[-1]%num)