import sys
input = sys.stdin.readline
n, m = map(int, input().split())
dp = [0] * (n + 2)

li_broken = [0] * m
for i in range(m):
  li_broken[i] = int(input())

dp[n] = 1
li_i = list(reversed(range(n)))

for i in li_i:

  if i in li_broken:
    dp[i] = 0

  else:
    dp[i] = (dp[i+1] + dp[i+2]) % 1000000007

      
print(dp[0])