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

dp =[0 for i in range(n+1)]
dp[0]=1

for i in range(n):
  if not i+1 in a:
    dp[i+1] += dp[i]
  if i < n-2:
    if not i+2 in a:
      dp[i+2] += dp[i]
if n in a:
  print(0)
else:
  print((dp[n-1]+dp[n-2])%1000000007)