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

dp = [0] * (n + 1)

dp[0] = 1

dp[1] = 1

for i in [int(eval(input())) for _ in range(m)]:

    dp[i] = -1

for i in range(n + 1):

    if i < 2:

        if dp[i] == -1:

            dp[i] = 0

    else:

        if dp[i] == -1:

            dp[i] = 0

        else:

            dp[i] = (dp[i-1] + dp[i-2]) % 1000000007

print((dp[n]))

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

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

dp = [0] * (n + 1)

for i in a:

    dp[i] = -1

for i in range(n + 1):

    if dp[i] == -1:

        dp[i] = 0

    else:

        if i >= 2:

            dp[i] = (dp[i-1] + dp[i-2]) % (10 ** 9 + 7)

        else:

            if dp[i] == -1:

                dp[i] = 0

            else:

                dp[i] = 1

print((dp[-1]))

n, m = list(map(int, input().split()))
dp = [0] * (n + 1)
dp[0] = 1
dp[1] = 1
for i in [int(eval(input())) for _ in range(m)]:
    dp[i] = -1
for i in range(n + 1):
    if i < 2:
        if dp[i] == -1:
            dp[i] = 0
    else:
        if dp[i] == -1:
            dp[i] = 0
        else:
            dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007
print((dp[n]))

n, m = list(map(int, input().split()))
a = [int(eval(input())) for _ in range(m)]
dp = [0] * (n + 1)
for i in a:
    dp[i] = -1
for i in range(n + 1):
    if dp[i] == -1:
        dp[i] = 0
    else:
        if i >= 2:
            dp[i] = (dp[i - 1] + dp[i - 2]) % (10**9 + 7)
        else:
            if dp[i] == -1:
                dp[i] = 0
            else:
                dp[i] = 1
print((dp[-1]))

+a = [int(eval(input())) for _ in range(m)] -dp[0] = 1 -dp[1] = 1 -for i in [int(eval(input())) for _ in range(m)]: +for i in a: -    if i < 2: -        if dp[i] == -1: -            dp[i] = 0 +    if dp[i] == -1: +        dp[i] = 0 -        if dp[i] == -1: -            dp[i] = 0 +        if i >= 2: +            dp[i] = (dp[i - 1] + dp[i - 2]) % (10**9 + 7) -            dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007 -print((dp[n])) +            if dp[i] == -1: +                dp[i] = 0 +            else: +                dp[i] = 1 +print((dp[-1]))