N, M = list(map(lambda n: int(n), input().split(" ")))

fibonacci = [1, 1, 2]
for i in range(1, N + 1):
  fibonacci.append((fibonacci[i] + fibonacci[i + 1]) % 1000000007)

fibonacci.append(1)
fibonacci.append(0)

A = [-1]
for i in range(M):
  A.append(int(input()))
A.append(N + 1)

ans = 1
# 1 23 45 67 89 (101)
# 0 -> 0
# 2 -> 22
# 24 -> 44
# 46 -> 66
# fibonacci(A[i + 1] - 2 - A[i])

for i in range(len(A) - 1):
  ans *= fibonacci[A[i+1]-A[i]-2] % 1000000007
  ans = ans % 1000000007
print(ans) N, M = list(map(lambda n: int(n), input().split(" "))) N list(map(lambda n: int(n), input().split(" "))) list map(lambda n: int(n), input().split(" ")) map lambda n: int(n) int(n) int n n input().split(" ") ().split () input split " " M fibonacci = [1, 1, 2] fibonacci [1, 1, 2] 1 1 2 for i in range(1, N + 1):
  fibonacci.append((fibonacci[i] + fibonacci[i + 1]) % 1000000007) i range(1, N + 1) range 1 N + 1 N 1 fibonacci.append((fibonacci[i] + fibonacci[i + 1]) % 1000000007) fibonacci.append fibonacci append (fibonacci[i] + fibonacci[i + 1]) % 1000000007 fibonacci[i] + fibonacci[i + 1] fibonacci[i] fibonacci i fibonacci[i + 1] fibonacci i + 1 i 1 1000000007 fibonacci.append(1) fibonacci.append fibonacci append 1 fibonacci.append(0) fibonacci.append fibonacci append 0 A = [-1] A [-1] -1 for i in range(M):
  A.append(int(input())) i range(M) range M A.append(int(input())) A.append A append int(input()) int input() input A.append(N + 1) A.append A append N + 1 N 1 ans = 1 ans 1 for i in range(len(A) - 1):
  ans *= fibonacci[A[i+1]-A[i]-2] % 1000000007
  ans = ans % 1000000007 i range(len(A) - 1) range len(A) - 1 len(A) len A 1 ans *= fibonacci[A[i+1]-A[i]-2] % 1000000007 ans fibonacci[A[i+1]-A[i]-2] % 1000000007 fibonacci[A[i+1]-A[i]-2] fibonacci A[i+1]-A[i]-2 A[i+1]-A[i] A[i+1] A i+1 i 1 A[i] A i 2 1000000007 ans = ans % 1000000007 ans ans % 1000000007 ans 1000000007 print(ans) print ans ans *= fibonacci[A[i+1]-A[i]-2] % 1000000007 fibonacci[A[i+1]-A[i]-2] % 1000000007 ans N, M = list(map(lambda n: int(n), input().split(" "))) list(map(lambda n: int(n), input().split(" "))) N M = list(map(lambda n: int(n), input().split(" "))) list(map(lambda n: int(n), input().split(" "))) M ans = 1 1 ans A = [-1] [-1] A ans = ans % 1000000007 ans % 1000000007 ans fibonacci = [1, 1, 2] [1, 1, 2] fibonacci
N, M = list(map(lambda n: int(n), input().split(" ")))

fibonacci = [1, 1, 2]
for i in range(1, N + 1):
  fibonacci.append((fibonacci[i] + fibonacci[i + 1]) % 1000000007)

fibonacci.append(1)
fibonacci.append(0)

A = [-1]
for i in range(M):
  A.append(int(input()))
A.append(N + 1)

ans = 1
# 1 23 45 67 89 (101)
# 0 -> 0
# 2 -> 22
# 24 -> 44
# 46 -> 66
# fibonacci(A[i + 1] - 2 - A[i])

for i in range(len(A) - 1):
  ans *= fibonacci[A[i+1]-A[i]-2] % 1000000007
  ans = ans % 1000000007
print(ans)