N,M=map(int,input().split())
res = 0
flag = True
#任意の数Kに対してたどり着く通り数
INF = 100000000000
stepList = [INF]*(N+1)
stepList[0] = 1
stepList[1] = 1
def stepF(K):
  if K == 0:
    return stepList[0]
  else:
    for i in range(1,K+1):
      if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
    return stepList[K]
  
if M == 0:
  res = stepF(N)
  
else:
  List = []
  for i in range (M):
    List.append(int(input()))
  #任意の数aが壊れている場合
  
  for i in range(M):
    if i == 0:
      res = stepF(List[i]-1)
    else:
      if List[i] - List[i-1] == 1:
        flag = False
        break
      res = res * stepF(List[i]-List[i-1]-2)
  res = res * stepF(N-List[M-1]-1)
if flag:
  print(res%1000000007)
else:
  print(0) N,M=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M res = 0 res 0 flag = True flag True INF = 100000000000 INF 100000000000 stepList = [INF]*(N+1) stepList [INF]*(N+1) [INF] INF N+1 N 1 stepList[0] = 1 stepList[0] stepList 0 1 stepList[1] = 1 stepList[1] stepList 1 1 def stepF(K):
  if K == 0:
    return stepList[0]
  else:
    for i in range(1,K+1):
      if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
    return stepList[K]
   stepF if K == 0:
    return stepList[0]
  else:
    for i in range(1,K+1):
      if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
    return stepList[K]
   K == 0 K 0 return stepList[0] stepList[0] stepList 0 for i in range(1,K+1):
      if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
     i range(1,K+1) range 1 K+1 K 1 if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
     i == 1 i 1 if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
     stepList[i]==INF stepList[i] stepList i INF stepList[i]= stepList[i-2] + stepList[i-1] stepList[i] stepList i stepList[i-2] + stepList[i-1] stepList[i-2] stepList i-2 i 2 stepList[i-1] stepList i-1 i 1 return stepList[K] stepList[K] stepList K K K if M == 0:
  res = stepF(N)
  
else:
  List = []
  for i in range (M):
    List.append(int(input()))
  #任意の数aが壊れている場合
  
  for i in range(M):
    if i == 0:
      res = stepF(List[i]-1)
    else:
      if List[i] - List[i-1] == 1:
        flag = False
        break
      res = res * stepF(List[i]-List[i-1]-2)
  res = res * stepF(N-List[M-1]-1) M == 0 M 0 res = stepF(N) res stepF(N) stepF N List = [] List [] for i in range (M):
    List.append(int(input()))
  #任意の数aが壊れている場合
  
   i range (M) range M List.append(int(input())) List.append List append int(input()) int input() input for i in range(M):
    if i == 0:
      res = stepF(List[i]-1)
    else:
      if List[i] - List[i-1] == 1:
        flag = False
        break
      res = res * stepF(List[i]-List[i-1]-2)
   i range(M) range M if i == 0:
      res = stepF(List[i]-1)
    else:
      if List[i] - List[i-1] == 1:
        flag = False
        break
      res = res * stepF(List[i]-List[i-1]-2)
   i == 0 i 0 res = stepF(List[i]-1) res stepF(List[i]-1) stepF List[i]-1 List[i] List i 1 if List[i] - List[i-1] == 1:
        flag = False
        break
       List[i] - List[i-1] == 1 List[i] - List[i-1] List[i] List i List[i-1] List i-1 i 1 1 flag = False flag False break res = res * stepF(List[i]-List[i-1]-2) res res * stepF(List[i]-List[i-1]-2) res stepF(List[i]-List[i-1]-2) stepF List[i]-List[i-1]-2 List[i]-List[i-1] List[i] List i List[i-1] List i-1 i 1 2 res = res * stepF(N-List[M-1]-1) res res * stepF(N-List[M-1]-1) res stepF(N-List[M-1]-1) stepF N-List[M-1]-1 N-List[M-1] N List[M-1] List M-1 M 1 1 if flag:
  print(res%1000000007)
else:
  print(0) flag print(res%1000000007) print res%1000000007 res 1000000007 print(0) print 0 M=map(int,input().split()) map(int,input().split()) M res = res * stepF(List[i]-List[i-1]-2) res * stepF(List[i]-List[i-1]-2) res N,M=map(int,input().split()) map(int,input().split()) N def stepF(K):
  if K == 0:
    return stepList[0]
  else:
    for i in range(1,K+1):
      if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
    return stepList[K]
   def stepF(K):
  if K == 0:
    return stepList[0]
  else:
    for i in range(1,K+1):
      if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
    return stepList[K]
   stepF flag = True True flag List = [] [] List res = 0 0 res res = stepF(N) stepF(N) res res = res * stepF(N-List[M-1]-1) res * stepF(N-List[M-1]-1) res res = stepF(List[i]-1) stepF(List[i]-1) res stepList = [INF]*(N+1) [INF]*(N+1) stepList INF = 100000000000 100000000000 INF flag = False False flag
N,M=map(int,input().split())
res = 0
flag = True
#任意の数Kに対してたどり着く通り数
INF = 100000000000
stepList = [INF]*(N+1)
stepList[0] = 1
stepList[1] = 1
def stepF(K):
  if K == 0:
    return stepList[0]
  else:
    for i in range(1,K+1):
      if i == 1:
        pass
      else:
        if stepList[i]==INF:
          stepList[i]= stepList[i-2] + stepList[i-1]
    return stepList[K]
  
if M == 0:
  res = stepF(N)
  
else:
  List = []
  for i in range (M):
    List.append(int(input()))
  #任意の数aが壊れている場合
  
  for i in range(M):
    if i == 0:
      res = stepF(List[i]-1)
    else:
      if List[i] - List[i-1] == 1:
        flag = False
        break
      res = res * stepF(List[i]-List[i-1]-2)
  res = res * stepF(N-List[M-1]-1)
if flag:
  print(res%1000000007)
else:
  print(0)