n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
ans = 1
MOD = 10**9+7
MAX = 10**5+1

fib = [0] * MAX
fib[0], fib[1] = 1, 2
for i, j in zip(a[:m-1], a[1:]):
    if j - i == 1:
        print(0)
        exit()

for i in range(2, MAX):
    fib[i] = fib[i-1] + fib[i-2]
    
for i in range(m+1):
    left = 0 if i == 0 else a[i-1] + 1
    right = n if i == m else a[i] - 1
    between = right - left
    if not between:
        continue
    ans *= fib[between-1]
    ans %= MOD
print(ans) n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m int(input()) for _ in range(m) for _ in range(m) _ range(m) range m for _ in range(m) int(input()) int input() input a = [int(input()) for _ in range(m)] a [int(input()) for _ in range(m)] ans = 1 ans 1 MOD = 10**9+7 MOD 10**9+7 10**9 10 9 7 MAX = 10**5+1 MAX 10**5+1 10**5 10 5 1 fib = [0] * MAX fib [0] * MAX [0] 0 MAX fib[0], fib[1] = 1, 2 fib[0] fib 0 1 fib[1] fib 1 2 for i, j in zip(a[:m-1], a[1:]):
    if j - i == 1:
        print(0)
        exit() i j zip(a[:m-1], a[1:]) zip a[:m-1] a :m-1 m-1 m 1 a[1:] a 1: 1 if j - i == 1:
        print(0)
        exit() j - i == 1 j - i j i 1 print(0) print 0 exit() exit for i in range(2, MAX):
    fib[i] = fib[i-1] + fib[i-2]
     i range(2, MAX) range 2 MAX fib[i] = fib[i-1] + fib[i-2] fib[i] fib i fib[i-1] + fib[i-2] fib[i-1] fib i-1 i 1 fib[i-2] fib i-2 i 2 for i in range(m+1):
    left = 0 if i == 0 else a[i-1] + 1
    right = n if i == m else a[i] - 1
    between = right - left
    if not between:
        continue
    ans *= fib[between-1]
    ans %= MOD i range(m+1) range m+1 m 1 left = 0 if i == 0 else a[i-1] + 1 left 0 if i == 0 else a[i-1] + 1 i == 0 i 0 0 a[i-1] + 1 a[i-1] a i-1 i 1 1 right = n if i == m else a[i] - 1 right n if i == m else a[i] - 1 i == m i m n a[i] - 1 a[i] a i 1 between = right - left between right - left right left if not between:
        continue
     not between between continue ans *= fib[between-1] ans fib[between-1] fib between-1 between 1 ans %= MOD ans MOD print(ans) print ans left = 0 if i == 0 else a[i-1] + 1 0 if i == 0 else a[i-1] + 1 left ans %= MOD MOD ans n, m = map(int, input().split()) map(int, input().split()) n ans *= fib[between-1] fib[between-1] ans MAX = 10**5+1 10**5+1 MAX a = [int(input()) for _ in range(m)] [int(input()) for _ in range(m)] a fib = [0] * MAX [0] * MAX fib between = right - left right - left between right = n if i == m else a[i] - 1 n if i == m else a[i] - 1 right m = map(int, input().split()) map(int, input().split()) m MOD = 10**9+7 10**9+7 MOD ans = 1 1 ans
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
ans = 1
MOD = 10**9+7
MAX = 10**5+1

fib = [0] * MAX
fib[0], fib[1] = 1, 2
for i, j in zip(a[:m-1], a[1:]):
    if j - i == 1:
        print(0)
        exit()

for i in range(2, MAX):
    fib[i] = fib[i-1] + fib[i-2]
    
for i in range(m+1):
    left = 0 if i == 0 else a[i-1] + 1
    right = n if i == m else a[i] - 1
    between = right - left
    if not between:
        continue
    ans *= fib[between-1]
    ans %= MOD
print(ans)