MOD = 1000000007



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

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



T = [0 for _ in range(N + 5)]



for a in A:

    T[a] = -1



T[0] = 1

for i in range(0, N):

    if i + 1 <= N and T[i + 1] != -1 and T[i] != -1:

        T[i + 1] = (T[i + 1] + T[i]) % MOD

    if i + 2 <= N and T[i + 2] != -1 and T[i] != -1:

        T[i + 2] = (T[i + 2] + T[i]) % MOD



print((T[N]))

MOD = 1000000007



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

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



T = [0 for _ in range(N + 5)]



for a in A:

    T[a] = -1



T[0] = 1

for i in range(0, N):

    if T[i + 1] != -1 and T[i] != -1:

        T[i + 1] = (T[i + 1] + T[i]) % MOD

    if T[i + 2] != -1 and T[i] != -1:

        T[i + 2] = (T[i + 2] + T[i]) % MOD



print((T[N]))

MOD = 1000000007
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
T = [0 for _ in range(N + 5)]
for a in A:
    T[a] = -1
T[0] = 1
for i in range(0, N):
    if i + 1 <= N and T[i + 1] != -1 and T[i] != -1:
        T[i + 1] = (T[i + 1] + T[i]) % MOD
    if i + 2 <= N and T[i + 2] != -1 and T[i] != -1:
        T[i + 2] = (T[i + 2] + T[i]) % MOD
print((T[N]))

MOD = 1000000007
N, M = list(map(int, input().split()))
A = [int(eval(input())) for _ in range(M)]
T = [0 for _ in range(N + 5)]
for a in A:
    T[a] = -1
T[0] = 1
for i in range(0, N):
    if T[i + 1] != -1 and T[i] != -1:
        T[i + 1] = (T[i + 1] + T[i]) % MOD
    if T[i + 2] != -1 and T[i] != -1:
        T[i + 2] = (T[i + 2] + T[i]) % MOD
print((T[N]))

-    if i + 1 <= N and T[i + 1] != -1 and T[i] != -1: +    if T[i + 1] != -1 and T[i] != -1: -    if i + 2 <= N and T[i + 2] != -1 and T[i] != -1: +    if T[i + 2] != -1 and T[i] != -1: