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

A=set(int(eval(input())) for _ in range(M))

D=[0]*(N+1)

D[0]=1



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

 if i in A: continue

 D[i]=D[i-1]+D[i-2]

print((D[-1] % (10**9+7)))
N,M=list(map(int, input().split()))

A=set(int(eval(input())) for _ in range(M))

D=[0]*(N+1)

D[0]=1



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

 if i in A: continue

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

print((D[-1]))
N, M = list(map(int, input().split()))
A = set(int(eval(input())) for _ in range(M))
D = [0] * (N + 1)
D[0] = 1
for i in range(1, N + 1):
    if i in A:
        continue
    D[i] = D[i - 1] + D[i - 2]
print((D[-1] % (10**9 + 7)))

N, M = list(map(int, input().split()))
A = set(int(eval(input())) for _ in range(M))
D = [0] * (N + 1)
D[0] = 1
for i in range(1, N + 1):
    if i in A:
        continue
    D[i] = (D[i - 1] + D[i - 2]) % (10**9 + 7)
print((D[-1]))

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