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

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

mod = 10 ** 9 + 7



dp = [0] * (n + 1)

dp[0] = 1



j = 0

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

    if j < m and i == arr[j]:

        dp[i] = 0

        j += 1

        continue



    if i == 1:

        dp[1] = dp[0]

        continue



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

    dp[i] %= mod



print((dp[n]))

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]

    dp[i] %= mod



print((dp[n]))

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

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]
    dp[i] %= mod
print((dp[n]))

+broken = set(arr) -j = 0 -    if j < m and i == arr[j]: -        dp[i] = 0 -        j += 1 +    if i in broken: