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

a=[]

for i in range(m):

    a.append(int(eval(input())))

dp=[0]*n

if 1 not in a:

    dp[0]=1

else:

    dp[0]=0

a=set(a)

for i in range(1,n):

    if i+1 in a:

        continue

    if i==1:

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

        continue

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

print((dp[-1]%((10**9)+7)))
n,m=list(map(int,input().split()))

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

mod=10**9+7

dp=[0]*(n+1)

dp[0]=1



a=set(a)

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

    if i in a:

        dp[i]=0

    elif i==1:

        dp[i]=1

    else:

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

print((dp[-1]))

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

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

-a = [] -for i in range(m): -    a.append(int(eval(input()))) -dp = [0] * n -if 1 not in a: -    dp[0] = 1 -else: -    dp[0] = 0 +a = [int(eval(input())) for i in range(m)] +mod = 10**9 + 7 +dp = [0] * (n + 1) +dp[0] = 1 -for i in range(1, n): -    if i + 1 in a: -        continue -    if i == 1: -        dp[i] = dp[i - 1] + 1 -        continue -    dp[i] = dp[i - 1] + dp[i - 2] -print((dp[-1] % ((10**9) + 7))) +for i in range(1, n + 1): +    if i in a: +        dp[i] = 0 +    elif i == 1: +        dp[i] = 1 +    else: +        dp[i] = (dp[i - 1] + dp[i - 2]) % mod +print((dp[-1]))