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

num = 1000000007



hole = [False]*(N+1)

a = [int(eval(input())) for _ in range(M)]

for i in a:

  hole[i] = True

  

dp = [0]*(N+1)

dp[0] = 1





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

  if i == 1:

    if hole[i] == True:

      dp[i] = 0

    else:

      dp[i] = dp[0]

  else:

    if hole[i] == True:

      dp[i] = 0

    else:

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

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

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

dp = [0]*(n+1)

dp[0] = 1

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

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

  if i in a: dp[i]=0

print((dp[n]))

N, M = list(map(int, input().split()))
num = 1000000007
hole = [False] * (N + 1)
a = [int(eval(input())) for _ in range(M)]
for i in a:
    hole[i] = True
dp = [0] * (N + 1)
dp[0] = 1
for i in range(1, N + 1):
    if i == 1:
        if hole[i] == True:
            dp[i] = 0
        else:
            dp[i] = dp[0]
    else:
        if hole[i] == True:
            dp[i] = 0
        else:
            dp[i] = dp[i - 1] + dp[i - 2]
print((dp[-1] % num))

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

-N, M = list(map(int, input().split())) -num = 1000000007 -hole = [False] * (N + 1) -a = [int(eval(input())) for _ in range(M)] -for i in a: -    hole[i] = True -dp = [0] * (N + 1) +n, m = list(map(int, input().split())) +a = set([int(eval(input())) for _ in range(m)]) +dp = [0] * (n + 1) -for i in range(1, N + 1): -    if i == 1: -        if hole[i] == True: -            dp[i] = 0 -        else: -            dp[i] = dp[0] -    else: -        if hole[i] == True: -            dp[i] = 0 -        else: -            dp[i] = dp[i - 1] + dp[i - 2] -print((dp[-1] % num)) +for i in range(1, n + 1): +    dp[i] = (dp[i - 1] + dp[i - 2]) % (10**9 + 7) +    if i in a: +        dp[i] = 0 +print((dp[n]))