n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = 10**9+7
dq = [0] * (n+1)
dq[0] = 1
for i in range(1, n+1):
  dq[i] = dq[i-1] + dq[i-2]
  if i in a:
    dq[i] = 0
print(dq[n] % mod)