N, M = map(int, input().split())
broken_floors = [int(input()) for _ in range(M)]

def get_num_of_ways(floor_number, broken_floors):
  memo = [-1 for _ in range(floor_number + 1)]
  
  def _fibo(n, skip):
    if n in skip:
      # Be careful n can be 1
      return 0
    if n <= 1:
      return 1
    if memo[n] >= 0:
      return memo[n]
    ways = _fibo(n - 1, skip) + _fibo(n - 2, skip)
    ways %= 1000000007
    memo[n] = ways
    return ways
    
  return _fibo(floor_number, broken_floors)

print(get_num_of_ways(N, broken_floors))