n, m = map(int, input().split())
mod = 10**9+7
ans = [1,1]
for i in range(2,100001):
  ans.append((ans[i-1]+ans[i-2])%mod)
num = 1
s = 0
for i in range(m):
  e = int(input())
  if e-1 < s:
    print(0)
    exit(0)
  num*=ans[e-1-s]
  num%=mod
  s = e+1
num*=ans[n-s]
print(num%mod) n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m mod = 10**9+7 mod 10**9+7 10**9 10 9 7 ans = [1,1] ans [1,1] 1 1 for i in range(2,100001):
  ans.append((ans[i-1]+ans[i-2])%mod) i range(2,100001) range 2 100001 ans.append((ans[i-1]+ans[i-2])%mod) ans.append ans append (ans[i-1]+ans[i-2])%mod ans[i-1]+ans[i-2] ans[i-1] ans i-1 i 1 ans[i-2] ans i-2 i 2 mod num = 1 num 1 s = 0 s 0 for i in range(m):
  e = int(input())
  if e-1 < s:
    print(0)
    exit(0)
  num*=ans[e-1-s]
  num%=mod
  s = e+1 i range(m) range m e = int(input()) e int(input()) int input() input if e-1 < s:
    print(0)
    exit(0)
   e-1 < s e-1 e 1 s print(0) print 0 exit(0) exit 0 num*=ans[e-1-s] num ans[e-1-s] ans e-1-s e-1 e 1 s num%=mod num mod s = e+1 s e+1 e 1 num*=ans[n-s] num ans[n-s] ans n-s n s print(num%mod) print num%mod num mod m = map(int, input().split()) map(int, input().split()) m num = 1 1 num s = 0 0 s n, m = map(int, input().split()) map(int, input().split()) n mod = 10**9+7 10**9+7 mod s = e+1 e+1 s num*=ans[n-s] ans[n-s] num ans = [1,1] [1,1] ans e = int(input()) int(input()) e num*=ans[e-1-s] ans[e-1-s] num num%=mod mod num
n, m = map(int, input().split())
mod = 10**9+7
ans = [1,1]
for i in range(2,100001):
  ans.append((ans[i-1]+ans[i-2])%mod)
num = 1
s = 0
for i in range(m):
  e = int(input())
  if e-1 < s:
    print(0)
    exit(0)
  num*=ans[e-1-s]
  num%=mod
  s = e+1
num*=ans[n-s]
print(num%mod)