n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = int(1e9 + 7)
one_or_two = [0] + [1] + [2] + [-1] * n
for i in range(3, n + 3):
    one_or_two[i] = (one_or_two[i-1] + one_or_two[i-2]) % mod
if m == 0:
    print(one_or_two[n])
    exit()
ans = 1
if a[0] > 1:
    ans *= one_or_two[a[0]-1]
for i in range(1, m):
    if a[i] - a[i-1] == 2:
        continue
    if a[i] - a[i-1] == 1:
        ans = 0
        break
    ans *= one_or_two[a[i] - a[i-1] - 2]
    ans %= mod
if n - a[-1] > 1:
    ans *= one_or_two[n - a[-1] - 1]
print(ans % mod) 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)] mod = int(1e9 + 7) mod int(1e9 + 7) int 1e9 + 7 1e9 7 one_or_two = [0] + [1] + [2] + [-1] * n one_or_two [0] + [1] + [2] + [-1] * n [0] + [1] + [2] [0] + [1] [0] 0 [1] 1 [2] 2 [-1] * n [-1] -1 n for i in range(3, n + 3):
    one_or_two[i] = (one_or_two[i-1] + one_or_two[i-2]) % mod i range(3, n + 3) range 3 n + 3 n 3 one_or_two[i] = (one_or_two[i-1] + one_or_two[i-2]) % mod one_or_two[i] one_or_two i (one_or_two[i-1] + one_or_two[i-2]) % mod one_or_two[i-1] + one_or_two[i-2] one_or_two[i-1] one_or_two i-1 i 1 one_or_two[i-2] one_or_two i-2 i 2 mod if m == 0:
    print(one_or_two[n])
    exit() m == 0 m 0 print(one_or_two[n]) print one_or_two[n] one_or_two n exit() exit ans = 1 ans 1 if a[0] > 1:
    ans *= one_or_two[a[0]-1] a[0] > 1 a[0] a 0 1 ans *= one_or_two[a[0]-1] ans one_or_two[a[0]-1] one_or_two a[0]-1 a[0] a 0 1 for i in range(1, m):
    if a[i] - a[i-1] == 2:
        continue
    if a[i] - a[i-1] == 1:
        ans = 0
        break
    ans *= one_or_two[a[i] - a[i-1] - 2]
    ans %= mod i range(1, m) range 1 m if a[i] - a[i-1] == 2:
        continue
     a[i] - a[i-1] == 2 a[i] - a[i-1] a[i] a i a[i-1] a i-1 i 1 2 continue if a[i] - a[i-1] == 1:
        ans = 0
        break
     a[i] - a[i-1] == 1 a[i] - a[i-1] a[i] a i a[i-1] a i-1 i 1 1 ans = 0 ans 0 break ans *= one_or_two[a[i] - a[i-1] - 2] ans one_or_two[a[i] - a[i-1] - 2] one_or_two a[i] - a[i-1] - 2 a[i] - a[i-1] a[i] a i a[i-1] a i-1 i 1 2 ans %= mod ans mod if n - a[-1] > 1:
    ans *= one_or_two[n - a[-1] - 1] n - a[-1] > 1 n - a[-1] n a[-1] a -1 1 ans *= one_or_two[n - a[-1] - 1] ans one_or_two[n - a[-1] - 1] one_or_two n - a[-1] - 1 n - a[-1] n a[-1] a -1 1 print(ans % mod) print ans % mod ans mod n, m = map(int, input().split()) map(int, input().split()) n mod = int(1e9 + 7) int(1e9 + 7) mod a = [int(input()) for _ in range(m)] [int(input()) for _ in range(m)] a ans *= one_or_two[a[i] - a[i-1] - 2] one_or_two[a[i] - a[i-1] - 2] ans ans *= one_or_two[n - a[-1] - 1] one_or_two[n - a[-1] - 1] ans ans = 1 1 ans ans *= one_or_two[a[0]-1] one_or_two[a[0]-1] ans m = map(int, input().split()) map(int, input().split()) m one_or_two = [0] + [1] + [2] + [-1] * n [0] + [1] + [2] + [-1] * n one_or_two ans %= mod mod ans ans = 0 0 ans
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]
mod = int(1e9 + 7)
one_or_two = [0] + [1] + [2] + [-1] * n
for i in range(3, n + 3):
    one_or_two[i] = (one_or_two[i-1] + one_or_two[i-2]) % mod
if m == 0:
    print(one_or_two[n])
    exit()
ans = 1
if a[0] > 1:
    ans *= one_or_two[a[0]-1]
for i in range(1, m):
    if a[i] - a[i-1] == 2:
        continue
    if a[i] - a[i-1] == 1:
        ans = 0
        break
    ans *= one_or_two[a[i] - a[i-1] - 2]
    ans %= mod
if n - a[-1] > 1:
    ans *= one_or_two[n - a[-1] - 1]
print(ans % mod)