MOD = 10 ** 9 + 7



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

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

broken = [False] * (N + 1)

for aa in a:

    broken[aa] = True



dp = [0] * (N + 1)

dp[0] = 1



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

    if broken[i]:

        continue

    if i >= 2:

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

    else:

        dp[i] = dp[i - 1]

    dp[i] %= MOD

print((dp[N]))

mod = 10 ** 9 + 7



n, m = list(map(int, input().split()))

a = tuple(int(eval(input())) for _ in range(m))

b = [False] * (n + 1)

for aa in a:

    b[aa] = True



dp = [0] * (n + 5)

dp[0] = 1



for i in range(n):

    if not b[i]:

        dp[i + 1] += dp[i]

        dp[i + 1] %= mod

        dp[i + 2] += dp[i]

        dp[i + 2] %= mod

print((dp[n]))

MOD = 10**9 + 7
N, M = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(M)]
broken = [False] * (N + 1)
for aa in a:
    broken[aa] = True
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
    if broken[i]:
        continue
    if i >= 2:
        dp[i] = dp[i - 1] + dp[i - 2]
    else:
        dp[i] = dp[i - 1]
    dp[i] %= MOD
print((dp[N]))

mod = 10**9 + 7
n, m = list(map(int, input().split()))
a = tuple(int(eval(input())) for _ in range(m))
b = [False] * (n + 1)
for aa in a:
    b[aa] = True
dp = [0] * (n + 5)
dp[0] = 1
for i in range(n):
    if not b[i]:
        dp[i + 1] += dp[i]
        dp[i + 1] %= mod
        dp[i + 2] += dp[i]
        dp[i + 2] %= mod
print((dp[n]))

-MOD = 10**9 + 7 -N, M = list(map(int, input().split())) -a = [int(eval(input())) for _ in range(M)] -broken = [False] * (N + 1) +mod = 10**9 + 7 +n, m = list(map(int, input().split())) +a = tuple(int(eval(input())) for _ in range(m)) +b = [False] * (n + 1) -    broken[aa] = True -dp = [0] * (N + 1) +    b[aa] = True +dp = [0] * (n + 5) -for i in range(1, N + 1): -    if broken[i]: -        continue -    if i >= 2: -        dp[i] = dp[i - 1] + dp[i - 2] -    else: -        dp[i] = dp[i - 1] -    dp[i] %= MOD -print((dp[N])) +for i in range(n): +    if not b[i]: +        dp[i + 1] += dp[i] +        dp[i + 1] %= mod +        dp[i + 2] += dp[i] +        dp[i + 2] %= mod +print((dp[n]))