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

C = [1, 0] # [-2段目, -1段目]
C += [0]*(N+10) # C = [-2段目, -1段目, 0段目, 1段目, 2段目, ...]
for n in range(0, N+1):
  if n not in A:
    C[n+2] = (C[n] + C[n+1]) % 1000000007
  else: # n in A:
    C[n+2] = 0

ans = C[N+2]  % 1000000007
print(ans)