import sys
N,M = map(int, input().strip().split(' '))
broken = [int(line.strip()) for line in sys.stdin]
p = [0]*(N+2)
p[0] = 1
for i in range(N):
  # 今i段目にいる
  if i in broken:
    continue
  p[i+1] += p[i]
  p[i+2] += p[i]
print(p[N]%1000000007)