INF = (10 ** 9) + 7

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



aLst = set(int(eval(input())) for i in range(M))

ansLst = [0] * (N + 1)

ansLst[0] = 1



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

    if i in aLst:

        continue

    tmp = ansLst[i - 1]

    if i > 1:

        tmp += ansLst[i - 2]

    ansLst[i] = tmp % INF





print((ansLst[N]))

INF = 10 ** 9 + 7



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

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

dp = [0] * (N + 1)

for i in range(M):

    dp[a[i]] = -1



dp[0] = 1

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

    if dp[i] == -1: continue

    tmp = 0

    if dp[i - 1] != -1:

        tmp += dp[i - 1]

    if dp[i - 2] != -1 and i > 1:

        tmp += dp[i - 2]

    dp[i] = tmp % INF



print((dp[N]))
INF = (10**9) + 7
N, M = list(map(int, input().split()))
aLst = set(int(eval(input())) for i in range(M))
ansLst = [0] * (N + 1)
ansLst[0] = 1
for i in range(1, N + 1):
    if i in aLst:
        continue
    tmp = ansLst[i - 1]
    if i > 1:
        tmp += ansLst[i - 2]
    ansLst[i] = tmp % INF
print((ansLst[N]))

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

-INF = (10**9) + 7 +INF = 10**9 + 7 -aLst = set(int(eval(input())) for i in range(M)) -ansLst = [0] * (N + 1) -ansLst[0] = 1 +a = [int(eval(input())) for _ in range(M)] +dp = [0] * (N + 1) +for i in range(M): +    dp[a[i]] = -1 +dp[0] = 1 -    if i in aLst: +    if dp[i] == -1: -    tmp = ansLst[i - 1] -    if i > 1: -        tmp += ansLst[i - 2] -    ansLst[i] = tmp % INF -print((ansLst[N])) +    tmp = 0 +    if dp[i - 1] != -1: +        tmp += dp[i - 1] +    if dp[i - 2] != -1 and i > 1: +        tmp += dp[i - 2] +    dp[i] = tmp % INF +print((dp[N]))