N, M = map(int, input().split())
NG = []
a = 10**9+7
for i in range(M):
  NG.append(int(input()))
ans = [0 for _ in range(N + 2)]
ans[0] = 1
for i in range(N):
  if not i + 1 in NG:
    ans[i + 1] = (ans[i + 1] + ans[i])%a
  if not i + 2 in NG:
    ans[i + 2] = (ans[i + 2] + ans[i])%a
print(ans[N])