MOD = 10**9 + 7



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

a = [int(eval(input())) for k in range(M)] + [-1]



dp = [0]*(N+1)

i = 0



dp[0] = 1

if a[0] == 1:

    dp[1] = 0

    i += 1

else:

    dp[1] = 1



for k in range(2,N+1):

    if k == a[i]:

        dp[k] = 0

        i += 1

    else:

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

        dp[k] %= MOD

print((dp[N]))

MOD = 10**9 + 7

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

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

dp = [0]*(N+2)

dp[0] = 1

for e in a:

    dp[e] = -1

for k in range(N):

    if dp[k] != -1:

        if dp[k+1] != -1:

            dp[k+1] += dp[k]

            dp[k+1] %= MOD

        if dp[k+2] != -1:

            dp[k+2] += dp[k]

            dp[k+2] %= MOD

print((max(0,dp[N])))

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

MOD = 10**9 + 7
N, M = list(map(int, input().split()))
a = [int(eval(input())) for k in range(M)]
dp = [0] * (N + 2)
dp[0] = 1
for e in a:
    dp[e] = -1
for k in range(N):
    if dp[k] != -1:
        if dp[k + 1] != -1:
            dp[k + 1] += dp[k]
            dp[k + 1] %= MOD
        if dp[k + 2] != -1:
            dp[k + 2] += dp[k]
            dp[k + 2] %= MOD
print((max(0, dp[N])))

-a = [int(eval(input())) for k in range(M)] + [-1] -dp = [0] * (N + 1) -i = 0 +a = [int(eval(input())) for k in range(M)] +dp = [0] * (N + 2) -if a[0] == 1: -    dp[1] = 0 -    i += 1 -else: -    dp[1] = 1 -for k in range(2, N + 1): -    if k == a[i]: -        dp[k] = 0 -        i += 1 -    else: -        dp[k] = dp[k - 1] + dp[k - 2] -        dp[k] %= MOD -print((dp[N])) +for e in a: +    dp[e] = -1 +for k in range(N): +    if dp[k] != -1: +        if dp[k + 1] != -1: +            dp[k + 1] += dp[k] +            dp[k + 1] %= MOD +        if dp[k + 2] != -1: +            dp[k + 2] += dp[k] +            dp[k + 2] %= MOD +print((max(0, dp[N])))