n, m = map(int, input().split())
a = [0]*m
for i in range(m):
  a[i] = int(input())


r1 = 1
if 1 in a:
  r = 0
else:
  r = 1
for i in range(2, n+1):
  r2 = r1
  r1 = r
  if i in a:
    r = 0
  else:
    r = r1 + r2

print(r%1000000007)