import numpy as np
import sys
N,M = map(int,input().split())
a = [int(input()) for i in range(M)]

def fib(n,b):
  b = np.zeros(n+1,dtype="int64")
  if n <= 1:
    return 1
  elif b[n]!=0:
    return b[n]
  b[n] = fib(n-1,b) +fib(n-2,b)
  return b[n]

  
s = 0
x = 1
for i in range (0,M):
  if s == a[i]:
    print("0")
    sys.exit()
  g = a[i]-1
  b = np.zeros(g-s+1,dtype="int64")
  x = x * fib(g-s,b)
  s = g + 2

x = x * fib(N-s,b)
print(x % 1000000007)