n, m = map(int, input().split())
a = [int(input())-1 for i in range(m)]
mod = 1000000007

dp = [0 for i in range(n+1)]
dp[0] = 1
for i in range(n):
  if not i in a:
    dp[i+1] = (dp[i] + dp[i-1])%mod
print(dp[len(dp)-1])
  