MOD = 10**9 + 7



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

dp = [0]*(N+1)

dp[0] = 1

A = set(int(eval(input())) for _ in range(M)) # 禁止地帯



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

  if i in A:

    continue

  x = dp[i-1]

  if i > 1:

    x += dp[i-2]

  dp[i] = x%MOD



answer = dp[N]

print(answer)

n,m,*a=list(map(int,open(0).read().split()))

b=[1]*(n+1)

for i in a:

    b[i]=0

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

    b[i]=(b[i-1]+b[i-2])%1000000007*b[i]

print((b[-1]))

MOD = 10**9 + 7
N, M = list(map(int, input().split()))
dp = [0] * (N + 1)
dp[0] = 1
A = set(int(eval(input())) for _ in range(M))  # 禁止地帯
for i in range(1, N + 1):
    if i in A:
        continue
    x = dp[i - 1]
    if i > 1:
        x += dp[i - 2]
    dp[i] = x % MOD
answer = dp[N]
print(answer)

n, m, *a = list(map(int, open(0).read().split()))
b = [1] * (n + 1)
for i in a:
    b[i] = 0
for i in range(2, n + 1):
    b[i] = (b[i - 1] + b[i - 2]) % 1000000007 * b[i]
print((b[-1]))

-MOD = 10**9 + 7 -N, M = list(map(int, input().split())) -dp = [0] * (N + 1) -dp[0] = 1 -A = set(int(eval(input())) for _ in range(M))  # 禁止地帯 -for i in range(1, N + 1): -    if i in A: -        continue -    x = dp[i - 1] -    if i > 1: -        x += dp[i - 2] -    dp[i] = x % MOD -answer = dp[N] -print(answer) +n, m, *a = list(map(int, open(0).read().split())) +b = [1] * (n + 1) +for i in a: +    b[i] = 0 +for i in range(2, n + 1): +    b[i] = (b[i - 1] + b[i - 2]) % 1000000007 * b[i] +print((b[-1]))