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

a=[int(eval(input())) for i in range(m)]

dp=[1]*(n+1)

for i in a:

    dp[i]=0

    

k=10**9+7

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

    if dp[i]!=0:

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

        

print((dp[-1]))

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

a={int(eval(input())) for i in range(m)}

dp=[0]*(n+2)

num=10**9+7

dp[0]=1

for i in range(n):

    if i in a:

        dp[i]=0

    else:

        dp[i]=dp[i]%num

        if i<n:

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

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

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

n, m = list(map(int, input().split()))
a = {int(eval(input())) for i in range(m)}
dp = [0] * (n + 2)
num = 10**9 + 7
dp[0] = 1
for i in range(n):
    if i in a:
        dp[i] = 0
    else:
        dp[i] = dp[i] % num
        if i < n:
            dp[i + 1] += dp[i]
            dp[i + 2] += dp[i]
print((dp[-2] % num))

-a = [int(eval(input())) for i in range(m)] -dp = [1] * (n + 1) -for i in a: -    dp[i] = 0 -k = 10**9 + 7 -for i in range(2, n + 1): -    if dp[i] != 0: -        dp[i] = (dp[i - 1] + dp[i - 2]) % k -print((dp[-1])) +a = {int(eval(input())) for i in range(m)} +dp = [0] * (n + 2) +num = 10**9 + 7 +dp[0] = 1 +for i in range(n): +    if i in a: +        dp[i] = 0 +    else: +        dp[i] = dp[i] % num +        if i < n: +            dp[i + 1] += dp[i] +            dp[i + 2] += dp[i] +print((dp[-2] % num))