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



brk_stair = [1] * (N + 1)

dp = [0] * (N + 1)



for _ in range(M):

    brk_stair[int(eval(input()))] = 0



#print(brk_stair)



dp[0] = 1

dp[1] = 1 * brk_stair[1]



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

    dp[i] = (dp[i - 1] + dp[i-2]) * brk_stair[i]



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

import numpy as np



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



brk_stair = np.ones(N+1, dtype = int)

dp = np.zeros(N+1, dtype= int)



for _ in range(M):

    brk_stair[int(eval(input()))] = 0



#print(brk_stair)



dp[0] = 1

dp[1] = 1 * brk_stair[1]



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

    dp[i] = (dp[i - 1] + dp[i-2]) * brk_stair[i]

    if(dp[i] > 1000000007):

        dp[i] = dp[i] % 1000000007



#print(dp)

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

N, M = list(map(int, input().split()))
brk_stair = [1] * (N + 1)
dp = [0] * (N + 1)
for _ in range(M):
    brk_stair[int(eval(input()))] = 0
# print(brk_stair)
dp[0] = 1
dp[1] = 1 * brk_stair[1]
for i in range(2, N + 1):
    dp[i] = (dp[i - 1] + dp[i - 2]) * brk_stair[i]
print((dp[-1] % 1000000007))

import numpy as np

N, M = list(map(int, input().split()))
brk_stair = np.ones(N + 1, dtype=int)
dp = np.zeros(N + 1, dtype=int)
for _ in range(M):
    brk_stair[int(eval(input()))] = 0
# print(brk_stair)
dp[0] = 1
dp[1] = 1 * brk_stair[1]
for i in range(2, N + 1):
    dp[i] = (dp[i - 1] + dp[i - 2]) * brk_stair[i]
    if dp[i] > 1000000007:
        dp[i] = dp[i] % 1000000007
# print(dp)
print((dp[-1] % 1000000007))

+import numpy as np + -brk_stair = [1] * (N + 1) -dp = [0] * (N + 1) +brk_stair = np.ones(N + 1, dtype=int) +dp = np.zeros(N + 1, dtype=int) +    if dp[i] > 1000000007: +        dp[i] = dp[i] % 1000000007 +# print(dp)