Mod = 10**9+7

N,M = list(map(int, input().split()))

a = [int(eval(input())) for _ in range(M)]

b = [1]*(N+1)

for j in a:

    b[j] = 0

for i in range(1,N+1):

    if b[i] == 0:

        continue

    if i == 1:

        b[1] = 1

        continue

    b[i] = b[i-1]+b[i-2]

    if b[i] >= Mod:

        b[i] %= Mod

print((b[N]))
# https://atcoder.jp/contests/abc129/submissions/5841482 を参考 

N,M = list(map(int, input().split()))

A = [int(eval(input())) for _ in range(M)]

MOD = 10**9 + 7

F = [1]*(N+1)

for j in A:

    F[j-1] = 0

 

a = 1; b = 0

for i in range(N):

    if not F[i]:    #F[i] == 0

        a, b = 0, a

    else:

        a, b = ((a+b) % MOD), a

print(a)
Mod = 10**9 + 7
N, M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)]
b = [1] * (N + 1)
for j in a:
    b[j] = 0
for i in range(1, N + 1):
    if b[i] == 0:
        continue
    if i == 1:
        b[1] = 1
        continue
    b[i] = b[i - 1] + b[i - 2]
    if b[i] >= Mod:
        b[i] %= Mod
print((b[N]))

# https://atcoder.jp/contests/abc129/submissions/5841482 を参考
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
MOD = 10**9 + 7
F = [1] * (N + 1)
for j in A:
    F[j - 1] = 0
a = 1
b = 0
for i in range(N):
    if not F[i]:  # F[i] == 0
        a, b = 0, a
    else:
        a, b = ((a + b) % MOD), a
print(a)

-Mod = 10**9 + 7 +# https://atcoder.jp/contests/abc129/submissions/5841482 を参考 -a = [int(eval(input())) for _ in range(M)] -b = [1] * (N + 1) -for j in a: -    b[j] = 0 -for i in range(1, N + 1): -    if b[i] == 0: -        continue -    if i == 1: -        b[1] = 1 -        continue -    b[i] = b[i - 1] + b[i - 2] -    if b[i] >= Mod: -        b[i] %= Mod -print((b[N])) +A = [int(eval(input())) for _ in range(M)] +MOD = 10**9 + 7 +F = [1] * (N + 1) +for j in A: +    F[j - 1] = 0 +a = 1 +b = 0 +for i in range(N): +    if not F[i]:  # F[i] == 0 +        a, b = 0, a +    else: +        a, b = ((a + b) % MOD), a +print(a)