n,m = map(int,input().split())
def Fib(n):
  seq = []
  a,b = 0,1
  for i in range(1,n+10):
    if i == 1:
      seq.append(0)
    elif i == 2:
      seq.append(1)
    else:
      a, b = b, a + b
      seq.append(b)
  return seq
table = Fib(n)
temp = -1
route = 1
mod = 10**9+7
for _ in range(m):
  a = int(input())
  dif = a-temp-1
  temp = a
  route = route*table[dif]%mod
print(route*table[n-temp]%mod)   n,m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m def Fib(n):
  seq = []
  a,b = 0,1
  for i in range(1,n+10):
    if i == 1:
      seq.append(0)
    elif i == 2:
      seq.append(1)
    else:
      a, b = b, a + b
      seq.append(b)
  return seq Fib seq = [] seq [] a,b = 0,1 a 0 b 1 for i in range(1,n+10):
    if i == 1:
      seq.append(0)
    elif i == 2:
      seq.append(1)
    else:
      a, b = b, a + b
      seq.append(b)
   i range(1,n+10) range 1 n+10 n 10 if i == 1:
      seq.append(0)
    elif i == 2:
      seq.append(1)
    else:
      a, b = b, a + b
      seq.append(b)
   i == 1 i 1 seq.append(0) seq.append seq append 0 elif i == 2:
      seq.append(1)
     i == 2 i 2 seq.append(1) seq.append seq append 1 a, b = b, a + b a b b a + b a b seq.append(b) seq.append seq append b return seq seq n n table = Fib(n) table Fib(n) Fib n temp = -1 temp -1 route = 1 route 1 mod = 10**9+7 mod 10**9+7 10**9 10 9 7 for _ in range(m):
  a = int(input())
  dif = a-temp-1
  temp = a
  route = route*table[dif]%mod _ range(m) range m a = int(input()) a int(input()) int input() input dif = a-temp-1 dif a-temp-1 a-temp a temp 1 temp = a temp a route = route*table[dif]%mod route route*table[dif]%mod route*table[dif] route table[dif] table dif mod print(route*table[n-temp]%mod) print route*table[n-temp]%mod route*table[n-temp] route table[n-temp] table n-temp n temp mod a = int(input()) int(input()) a route = 1 1 route def Fib(n):
  seq = []
  a,b = 0,1
  for i in range(1,n+10):
    if i == 1:
      seq.append(0)
    elif i == 2:
      seq.append(1)
    else:
      a, b = b, a + b
      seq.append(b)
  return seq def Fib(n):
  seq = []
  a,b = 0,1
  for i in range(1,n+10):
    if i == 1:
      seq.append(0)
    elif i == 2:
      seq.append(1)
    else:
      a, b = b, a + b
      seq.append(b)
  return seq Fib table = Fib(n) Fib(n) table temp = -1 -1 temp mod = 10**9+7 10**9+7 mod temp = a a temp dif = a-temp-1 a-temp-1 dif m = map(int,input().split()) map(int,input().split()) m n,m = map(int,input().split()) map(int,input().split()) n route = route*table[dif]%mod route*table[dif]%mod route
n,m = map(int,input().split())
def Fib(n):
  seq = []
  a,b = 0,1
  for i in range(1,n+10):
    if i == 1:
      seq.append(0)
    elif i == 2:
      seq.append(1)
    else:
      a, b = b, a + b
      seq.append(b)
  return seq
table = Fib(n)
temp = -1
route = 1
mod = 10**9+7
for _ in range(m):
  a = int(input())
  dif = a-temp-1
  temp = a
  route = route*table[dif]%mod
print(route*table[n-temp]%mod)  