n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
m = 10**9+7

dp = [1, 1]
if 1 in a:
  dp[1] = 0

for i in range(2, n+1):
  t = 0 if i in a else (dp[i-2] + dp[i-1]) % m
  dp.append(t)

print(dp[-1])
