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

if 1 in a:
  step = [1,0]
else:
  step = [1,1]

for i in range(2, n + 1):
  if i in a:
    step.append(0)
  else:
    step.append((step[-1] + step[-2])%1000000007)
    
print(step[-1])