huge = 10**9+7

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

a = [0,1]

b = []

now = 0

for _ in range(m):

  b.append(int(eval(input())))

b.append(n+1)

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

  if b[now] == i:

    tmp = 0

    now += 1

  else:

    tmp = a[-2] + a[-1]

  a.append(tmp % huge)

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

mod = 10 ** 9 + 7

broken = []

for _ in range(m):

  broken.append(int(eval(input())))

here = 0

dp = [0,1]

for i in range(n):

  if here != m:

    if i+1 == broken[here]:

      dp.append(0)

      here += 1

    else:

      dp.append((dp[-2]+dp[-1])%mod)

  else:

    dp.append((dp[-2]+dp[-1])%mod)

print((dp[-1]))

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

n, m = list(map(int, input().split()))
mod = 10**9 + 7
broken = []
for _ in range(m):
    broken.append(int(eval(input())))
here = 0
dp = [0, 1]
for i in range(n):
    if here != m:
        if i + 1 == broken[here]:
            dp.append(0)
            here += 1
        else:
            dp.append((dp[-2] + dp[-1]) % mod)
    else:
        dp.append((dp[-2] + dp[-1]) % mod)
print((dp[-1]))
# print(dp)

-huge = 10**9 + 7 -a = [0, 1] -b = [] -now = 0 +mod = 10**9 + 7 +broken = [] -    b.append(int(eval(input()))) -b.append(n + 1) -for i in range(1, n + 1): -    if b[now] == i: -        tmp = 0 -        now += 1 +    broken.append(int(eval(input()))) +here = 0 +dp = [0, 1] +for i in range(n): +    if here != m: +        if i + 1 == broken[here]: +            dp.append(0) +            here += 1 +        else: +            dp.append((dp[-2] + dp[-1]) % mod) -        tmp = a[-2] + a[-1] -    a.append(tmp % huge) -print((a[-1])) +        dp.append((dp[-2] + dp[-1]) % mod) +print((dp[-1])) +# print(dp)