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

r = [0]*(n+1)
r[0] = 1
if 1 in a:
  r[1] = 0
else:
  r[1] = 1
for i in range(2, n+1):
  if i in a:
    continue
  else:
    r[i] = (r[i-1] + r[i-2])%1000000007

print(r[n])