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

a = [int(eval(input())) for i in range(M)] + [10**20]



dp = [1] + [0 for i in range(N+2)]



next_a = a.pop(0)



for i in range(N):

    if next_a == i:

        dp[i] = 0

        next_a = a.pop(0)

    else:

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

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

print((dp[N]%1000000007))

MOD = 1000000007



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

N += 1

dp = [0] * N

dp[0] = 1



for i in range(M):

    a = int(eval(input()))

    dp[a] = -1

    

for i in range(N):

    if dp[i] == -1: continue



    dp[i] %= MOD

    

    if i+1 < N and dp[i+1] != -1: dp[i+1] += dp[i]

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



print((dp[-1] % MOD))

N, M = list(map(int, input().split()))
a = [int(eval(input())) for i in range(M)] + [10**20]
dp = [1] + [0 for i in range(N + 2)]
next_a = a.pop(0)
for i in range(N):
    if next_a == i:
        dp[i] = 0
        next_a = a.pop(0)
    else:
        dp[i + 1] += dp[i]
        dp[i + 2] += dp[i]
print((dp[N] % 1000000007))

MOD = 1000000007
N, M = list(map(int, input().split()))
N += 1
dp = [0] * N
dp[0] = 1
for i in range(M):
    a = int(eval(input()))
    dp[a] = -1
for i in range(N):
    if dp[i] == -1:
        continue
    dp[i] %= MOD
    if i + 1 < N and dp[i + 1] != -1:
        dp[i + 1] += dp[i]
    if i + 2 < N and dp[i + 2] != -1:
        dp[i + 2] += dp[i]
print((dp[-1] % MOD))

+MOD = 1000000007 -a = [int(eval(input())) for i in range(M)] + [10**20] -dp = [1] + [0 for i in range(N + 2)] -next_a = a.pop(0) +N += 1 +dp = [0] * N +dp[0] = 1 +for i in range(M): +    a = int(eval(input())) +    dp[a] = -1 -    if next_a == i: -        dp[i] = 0 -        next_a = a.pop(0) -    else: +    if dp[i] == -1: +        continue +    dp[i] %= MOD +    if i + 1 < N and dp[i + 1] != -1: +    if i + 2 < N and dp[i + 2] != -1: -print((dp[N] % 1000000007)) +print((dp[-1] % MOD))