n, m = [int(x) for x in input().split()]
a = [int(input()) for _ in range(m)]
# a = [int(x) for x in input().split()]

memo = [0]*(n + 1)

for i in range(n+1):
  if i in a:
    continue
  else:
    if i == 0 or i == 1:
      memo[i] = 1
    else:
      memo[i] = memo[i-1] + memo[i-2]

print(memo[n]%((10**9)+7))
