N, M = map(int, input().split())
P = [0] * (N + 1)
p = 10 ** 9 + 7
B = int(input())
M -= 1
P[0] = 1
P[1] = 1
if B == 1:
  P[1] = 0
  if M > 0:
    B = int(input())
    M -= 1
for i in range(2, N + 1):
  P[i] = (P[i - 1] + P[i - 2]) % p
  if i == B:
    P[i] = 0
    if M > 0:
      B = int(input())
      M -= 1
print(P[N])