N, M = map(int, input().split())
a = int(input())
P = [0]*(N+1)
P[0] = 1
if a == 1:
  P[1] = 0
  a = int(input())
else:
  P[1] = 1

for i in range(2,N+1):
  if i == a:
    P[i] = 0
    try:
      a = int(input())
    except EOFError:
      continue
  else:
    P[i] = P[i-1] + P[i-2]
print(P[-1]%1000000007)