n,m = map(int, input().split())
step = []

now = 0
for i in range(m):
  next = int(input()) - 1
  step.append(next - now)
  now = next + 2

step.append(n-now)  
step.sort()

def fibo():
  s = []
  a = 1
  b = 1
  s.append(a)
  s.append(b)
  for i in range(n):
    c = a+b
    a = b
    b = c
    s.append(c)
  return s

ans = 1

if step[0] < 0:
  ans = 0

else:
  f = fibo()
  for i in step:
    ans *= f[i]

print(ans % 1000000007) n,m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m step = [] step [] now = 0 now 0 for i in range(m):
  next = int(input()) - 1
  step.append(next - now)
  now = next + 2 i range(m) range m next = int(input()) - 1 next int(input()) - 1 int(input()) int input() input 1 step.append(next - now) step.append step append next - now next now now = next + 2 now next + 2 next 2 step.append(n-now) step.append step append n-now n now step.sort() step.sort step sort def fibo():
  s = []
  a = 1
  b = 1
  s.append(a)
  s.append(b)
  for i in range(n):
    c = a+b
    a = b
    b = c
    s.append(c)
  return s fibo s = [] s [] a = 1 a 1 b = 1 b 1 s.append(a) s.append s append a s.append(b) s.append s append b for i in range(n):
    c = a+b
    a = b
    b = c
    s.append(c)
   i range(n) range n c = a+b c a+b a b a = b a b b = c b c s.append(c) s.append s append c return s s ans = 1 ans 1 if step[0] < 0:
  ans = 0

else:
  f = fibo()
  for i in step:
    ans *= f[i] step[0] < 0 step[0] step 0 0 ans = 0 ans 0 f = fibo() f fibo() fibo for i in step:
    ans *= f[i] i step ans *= f[i] ans f[i] f i print(ans % 1000000007) print ans % 1000000007 ans 1000000007 f = fibo() fibo() f m = map(int, input().split()) map(int, input().split()) m now = next + 2 next + 2 now n,m = map(int, input().split()) map(int, input().split()) n now = 0 0 now def fibo():
  s = []
  a = 1
  b = 1
  s.append(a)
  s.append(b)
  for i in range(n):
    c = a+b
    a = b
    b = c
    s.append(c)
  return s def fibo():
  s = []
  a = 1
  b = 1
  s.append(a)
  s.append(b)
  for i in range(n):
    c = a+b
    a = b
    b = c
    s.append(c)
  return s fibo ans *= f[i] f[i] ans step = [] [] step next = int(input()) - 1 int(input()) - 1 next ans = 0 0 ans ans = 1 1 ans
n,m = map(int, input().split())
step = []

now = 0
for i in range(m):
  next = int(input()) - 1
  step.append(next - now)
  now = next + 2

step.append(n-now)  
step.sort()

def fibo():
  s = []
  a = 1
  b = 1
  s.append(a)
  s.append(b)
  for i in range(n):
    c = a+b
    a = b
    b = c
    s.append(c)
  return s

ans = 1

if step[0] < 0:
  ans = 0

else:
  f = fibo()
  for i in step:
    ans *= f[i]

print(ans % 1000000007)