import sys
sys.setrecursionlimit(10**6)
from functools import lru_cache


n,m=map(int,input().split())
A = [int(input()) for i in range(m)]
mod = 10**9+7
memo={}
memo[1]=1
memo[0]=1

@lru_cache(maxsize=10000000)
def fib(n):
  if n in A:
  	memo[n]=0
  	return memo[n]
  if n not in memo:
    memo[n] = fib(n-1) + fib(n-2)
  return memo[n]

print(fib(n)%mod)