MOD_NUM = 1000000007

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

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

cases = [1] + [0 for _ in range(N)]

for a in alist:cases[a] = None



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

  if cases[i] is None:continue

  if cases[i-1] is not None:cases[i] += cases[i-1] 

  if i >= 2 and cases[i-2] is not None: cases[i] += cases[i-2]

print((cases[-1]%MOD_NUM))  
MOD = 10 ** 9 + 7

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

A = [True for _ in range(N+1)]

for _ in range(M):

    A[int(eval(input()))] = False



dp = [1 for _ in range(N + 1)]

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

    if A[i] == True:

        if i - 2 >= 0:

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

        else:

            dp[i] = (dp[i - 1]) % MOD

    else:

        dp[i] = 0

print((dp[-1] % MOD))
MOD_NUM = 1000000007
N, M = list(map(int, input().split()))
alist = [int(eval(input())) for _ in range(M)]
cases = [1] + [0 for _ in range(N)]
for a in alist:
    cases[a] = None
for i in range(1, N + 1):
    if cases[i] is None:
        continue
    if cases[i - 1] is not None:
        cases[i] += cases[i - 1]
    if i >= 2 and cases[i - 2] is not None:
        cases[i] += cases[i - 2]
print((cases[-1] % MOD_NUM))

MOD = 10**9 + 7
N, M = list(map(int, input().split()))
A = [True for _ in range(N + 1)]
for _ in range(M):
    A[int(eval(input()))] = False
dp = [1 for _ in range(N + 1)]
for i in range(1, N + 1):
    if A[i] == True:
        if i - 2 >= 0:
            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD
        else:
            dp[i] = (dp[i - 1]) % MOD
    else:
        dp[i] = 0
print((dp[-1] % MOD))

-MOD_NUM = 1000000007 +MOD = 10**9 + 7 -alist = [int(eval(input())) for _ in range(M)] -cases = [1] + [0 for _ in range(N)] -for a in alist: -    cases[a] = None +A = [True for _ in range(N + 1)] +for _ in range(M): +    A[int(eval(input()))] = False +dp = [1 for _ in range(N + 1)] -    if cases[i] is None: -        continue -    if cases[i - 1] is not None: -        cases[i] += cases[i - 1] -    if i >= 2 and cases[i - 2] is not None: -        cases[i] += cases[i - 2] -print((cases[-1] % MOD_NUM)) +    if A[i] == True: +        if i - 2 >= 0: +            dp[i] = (dp[i - 1] + dp[i - 2]) % MOD +        else: +            dp[i] = (dp[i - 1]) % MOD +    else: +        dp[i] = 0 +print((dp[-1] % MOD))