N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]

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

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

print(fibs[-1])