N, M = map(int, input().split())
a = [int(input()) for i in range(M)]
pat = [0]*(N+1)
for i in range(N+1):
  if i == 0:
    pat[i] = 1
  else:
    before1 = pat[i-1] if i-1 not in a else 0
    before2 = pat[i-2] if i-2 not in a else 0
    pat[i] = before1 + before2
print(pat[-1]%1000000007)