import sys

import numpy as np
MOD = 1000000007

def main():
  n, m = [int(x) for x in input().split()]
  pattern = [1]
  broken = -1
  brokencnc = 0
  if brokencnt < m:
    broken = int(input())
    brokencnt += 1

  for i in range(1, n + 1):
    if i == boken:
      pattern.append(0)
      if brokencnc < m:
        broken = int(input())
        brokencnt += 1
      continue
      
      if i == 1:
        pattern.append(pattern[i-1])
        
      if i > 1:
        pattern.append((pattern[i-1] + pattern[i-2])%MOD)
    print(pattern[n])
 main()