N, M = map(int, input().split())
A = []
for i in range(M):
  A.append(int(input()))

X = [0] * (N + 1)
for i in range(N + 1):
  if i == 0:
    X[i] = 1
  elif i == 1:
    if 1 not in A:
      X[i] = 1
    else:
      X[i] = 0
  else:
    if i in A:
      X[i] = 0
    else:
      X[i] = (X[i - 1] + X[i - 2]) % 1000000007

print(X[N])
