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

p = 1000000007

dp = [0] * n

c = 0

for _ in range(m):

    a = int(eval(input()))

    dp[a - 1] = -1

for i in range(1, n):

    if i <= 1:

        if dp[0] != -1 and dp[1] != -1:

            dp[0], dp[1] = 1, 2

        elif dp[0] == -1 and dp[1] != -1:

            dp[0], dp[1] = 0, 1

        elif dp[0] != -1 and dp[1] == -1:

            dp[0], dp[1] = 1, 0

        else:

            c = -1

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

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

            dp[i] = dp[i - 2]

        elif dp[i - 1] != -1 and dp[i - 2] == -1:

            dp[i] = dp[i - 1]

        elif dp[i - 1] != -1 and dp[i - 2] != -1:

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

        else:

            c = -1

if c == -1:

    print((0))

elif n == 1:

    print((1))

else:

    print((dp[n - 1]))
n, m = list(map(int, input().split()))

mod = pow(10, 9) + 7

dp = [0] * (n + 5)

for _ in range(m):

    a = int(eval(input()))

    dp[a] = -1

dp[0] = 1

for i in range(n):

    if not dp[i] == -1:

        dp[i] %= mod

    else:

        continue

    if not dp[i + 1] == -1:

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

    if not dp[i + 2] == -1:

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

ans = dp[n] % mod

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

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

-p = 1000000007 -dp = [0] * n -c = 0 +mod = pow(10, 9) + 7 +dp = [0] * (n + 5) -    dp[a - 1] = -1 -for i in range(1, n): -    if i <= 1: -        if dp[0] != -1 and dp[1] != -1: -            dp[0], dp[1] = 1, 2 -        elif dp[0] == -1 and dp[1] != -1: -            dp[0], dp[1] = 0, 1 -        elif dp[0] != -1 and dp[1] == -1: -            dp[0], dp[1] = 1, 0 -        else: -            c = -1 -    if i >= 2 and dp[i] != -1: -        if dp[i - 1] == -1 and dp[i - 2] != -1: -            dp[i] = dp[i - 2] -        elif dp[i - 1] != -1 and dp[i - 2] == -1: -            dp[i] = dp[i - 1] -        elif dp[i - 1] != -1 and dp[i - 2] != -1: -            dp[i] = (dp[i - 1] + dp[i - 2]) % p -        else: -            c = -1 -if c == -1: -    print((0)) -elif n == 1: -    print((1)) -else: -    print((dp[n - 1])) +    dp[a] = -1 +dp[0] = 1 +for i in range(n): +    if not dp[i] == -1: +        dp[i] %= mod +    else: +        continue +    if not dp[i + 1] == -1: +        dp[i + 1] += dp[i] +    if not dp[i + 2] == -1: +        dp[i + 2] += dp[i] +ans = dp[n] % mod +print(ans)