import sys
N, M = map(int, input().split())
li = []
for i in range(M):
  li.append(int(input()))

# 例外処理
if li[-1] == N:
  print(0)
  sys.exit()

step_li = [0, 1]
result = 0
for i in range(2, N+2):
  if i-1 not in li:
    step_li.append(step_li[i-1] + step_li[i-2])
  else:
    step_li.append(0)
    
print(step_li[-1] % 1000000007)