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

arr = [int(eval(input())) for _ in range(m)]

broken = set(arr)



mod = 10 ** 9 + 7



dp = [0] * (n+1)

dp[0] = 1



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

    if i in broken:

        continue

    

    if i == 1:

        dp[1] = dp[0]

        continue

    

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



print((dp[n] % mod))
n, m = list(map(int, input().split()))

li = [int(eval(input())) for _ in range(m)]

mod = 10**9 + 7



dp = [-1] * (n+1)

dp[0] = 1



for i in li:

    dp[i] = 0



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

    if dp[i] == 0:

        continue

    

    if i == 1:

        dp[1] = 1

    else:

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

        

print((dp[-1]))

n, m = list(map(int, input().split()))
arr = [int(eval(input())) for _ in range(m)]
broken = set(arr)
mod = 10**9 + 7
dp = [0] * (n + 1)
dp[0] = 1
for i in range(1, n + 1):
    if i in broken:
        continue
    if i == 1:
        dp[1] = dp[0]
        continue
    dp[i] = dp[i - 1] + dp[i - 2]
print((dp[n] % mod))

n, m = list(map(int, input().split()))
li = [int(eval(input())) for _ in range(m)]
mod = 10**9 + 7
dp = [-1] * (n + 1)
dp[0] = 1
for i in li:
    dp[i] = 0
for i in range(1, n + 1):
    if dp[i] == 0:
        continue
    if i == 1:
        dp[1] = 1
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print((dp[-1]))

-arr = [int(eval(input())) for _ in range(m)] -broken = set(arr) +li = [int(eval(input())) for _ in range(m)] -dp = [0] * (n + 1) +dp = [-1] * (n + 1) +for i in li: +    dp[i] = 0 -    if i in broken: +    if dp[i] == 0: -        dp[1] = dp[0] -        continue -    dp[i] = dp[i - 1] + dp[i - 2] -print((dp[n] % mod)) +        dp[1] = 1 +    else: +        dp[i] = (dp[i - 1] + dp[i - 2]) % mod +print((dp[-1]))